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

  1. Go to your Attribution Setup page at /brand/attribution/setup
  2. Under “Step 1: Generate API Key”, enter a label (e.g., “Production”)
  3. Click Generate Key
  4. 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>
FieldTypeRequiredDescription
order_idstring YesYour order/transaction ID
revenuenumber YesTotal order value
currencystringNoISO currency code (default: USD)
promo_code_usedstringNoDiscount code used at checkout
is_new_customerbooleanNoFirst-time buyer flag
4

Verify Installation

After installing, verify the pixel is working:

  1. Open your website in a browser
  2. Open DevTools Network tab
  3. Filter for pixel.js — you should see a 200 response
  4. 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_ref parameter)
  • 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

Troubleshooting