What is the CC SDK?
The CreatorCommerce SDK is a lightweight JavaScript layer that detects affiliate context from incoming links and stores it in Shopify cart attributes. It runs automatically in the background — once enabled, it handles:- Shopper context detection — When a user arrives through an affiliate link, the SDK reads the creator, campaign, and shop identifiers from the URL
- Cart attribute persistence — The SDK writes
cc-creator-handle,cc-creator-id,cc-campaign-id, andcc-shop-idto the Shopify cart - Automatic updates — If the shopper clicks a different affiliate link, the SDK seamlessly updates the cart attributes to reflect the new context
- Personalization triggers — Once cart attributes are set, your Liquid templates can resolve the full creator metaobject and personalize the experience
Installation
The SDK is delivered as a Shopify Theme App Embed. To enable it:
No code changes are required. The SDK inject runs on every page of your theme once enabled.
Cart Attributes Set by the SDK
When a shopper arrives through an affiliate link, the SDK writes these attributes:| Attribute | Example Value | Purpose |
|---|---|---|
cc-creator-handle | "tiffanyhoughton" | Primary key for resolving the creator metaobject |
cc-creator-id | "677c1a5b7ea8a6e015ab46f3" | CreatorCommerce internal creator ID |
cc-campaign-id | "6765aa58f5ea34a02280fd3e" | Campaign the creator belongs to |
cc-shop-id | "677c1a5b7ea8a6e015ab46f3" | CreatorCommerce shop identifier |
Basic Liquid Usage
Once the SDK sets cart attributes, resolve the creator in any section or snippet:Verifying the SDK
To confirm the SDK is working, open your browser console on any page after clicking an affiliate link and run:cc- attributes in the response if the SDK is active.
How Attribute Updates Work
| Scenario | Behavior |
|---|---|
| Shopper clicks Creator A’s link | Attributes set to Creator A |
| Same shopper clicks Creator B’s link | Attributes overwritten to Creator B |
| Shopper visits directly (no affiliate link) | Existing attributes persist from last affiliate visit |
| Cart is emptied / new session | Attributes cleared with the cart |
Next Steps
Referencing Creator Content
Access all creator fields on any page
Enable Tracking
Set up full funnel tracking with the SDK + web pixel