Install the Tracking Pixel
Add one line of code to start tracking creator-driven conversions.
Prerequisites
- A CreatorScore brand account
- Access to your website's HTML
<head>tag (or a tag manager) - An API key (generated in the Attribution Setup page)
1
Generate Your API Key
- Go to your Attribution Setup page at
/brand/attribution/setup - Under “Step 1: Generate API Key”, enter a label (e.g., “Production”)
- Click Generate Key
- Copy the key immediately — it won't be shown again in full
Attribution Setup — API Key
Production
cs_live_a4f8...b2e1
Keep your API key secret. Never expose it in client-side code other than the pixel snippet.
2
Add the Pixel to Your Site
html
<!-- CreatorScore Attribution Pixel -->
<script src="https://creatorscore.io/api/v1/track/pixel.js?key=YOUR_API_KEY" async></script>Add this to the <head> tag of every page on your site. The pixel automatically tracks page views from creator referral links using anonymous session IDs.
Platform-Specific Instructions
Go to Online Store → Themes → Edit Code → Open theme.liquid → Paste the snippet before </head>.
3
Track Purchases
The pixel auto-tracks page views. For purchase tracking, add this to your order confirmation page:
html
<script>
CreatorScore.track('purchase', {
order_id: 'ORDER_123',
revenue: 49.99,
currency: 'USD',
promo_code_used: 'CREATOR20',
is_new_customer: true
});
</script>| Field | Type | Required | Description |
|---|---|---|---|
order_id | string | Yes | Your order/transaction ID |
revenue | number | Yes | Total order value |
currency | string | No | ISO currency code (default: USD) |
promo_code_used | string | No | Discount code used at checkout |
is_new_customer | boolean | No | First-time buyer flag |
4
Verify Installation
After installing, verify the pixel is working:
- Open your website in a browser
- Open DevTools → Network tab
- Filter for
pixel.js— you should see a 200 response - Click a tracking link, visit your site, then check your Attribution dashboard for the click
It can take up to 60 seconds for new events to appear in your Attribution dashboard.
What the Pixel Tracks
- Page views — Automatically tracked on every page load
- Referral source — Captures which tracking link brought the visitor (via
cs_refparameter) - Session ID — Anonymous UUID stored in a 30-day cookie (
_cs_pv) - Purchase events — When you call
CreatorScore.track('purchase', {...})
What the Pixel Does NOT Track
- No personally identifiable information (PII)
- No email addresses, names, or phone numbers
- No cross-site tracking
- IP addresses are hashed daily and never stored raw