The Tracking Line
The one line of script that records referral visits on your own pages for a Siren Cloud Property, and passes each visit on to Stripe or Shopify checkout.
Siren Cloud
Last updated: October 26, 2026
The tracking line is one line of script you paste into your website. When someone arrives through a collaborator’s referral link, it records the visit with Siren Cloud and carries it through to checkout, so the sale that follows is credited to that collaborator. Stripe and Shopify send the sale itself. The line only handles the visit.
A WordPress site connected with the Siren Cloud Connector records its own visits, so it doesn’t need the tracking line.
Get the line
Each Property has one tracking line, and it covers the Stripe and Shopify connections set up on that Property when you copy it. It appears once Stripe or Shopify is set up on the Property. Copy it again after you add Stripe or Shopify to the Property.
- Open the Property from Settings > Properties.
- Find the “Tracking” card. “Hosted tracker” under “Add integration” jumps to it too.
- Click “Copy line”.
It looks like this, with your own token at the end:
<script async src="https://auth.sirenaffiliates.com/v1/tracker/siren.js?t=YOUR_TOKEN"></script>
Only Admins see the line. A Platform Manager setting up Stripe or Shopify sees a longer script under “Copy script” that does the same job, and either one works.
Add it to your site
Paste the line once on every page of the site, in the part of the page that loads on every page, right above </head>. Most site builders have a setting for custom code in the page header. For Shopify, the Connect Shopify steps show where it goes in your theme.
What it does
- When a page opens with
?ref=and a collaborator’s referral code in the address, the line records the visit with Siren Cloud. It records a code only when it belongs to an active collaborator. - It keeps the visit in your visitor’s browser, in a
siren_visitcookie and in local storage for the address the page is on, so a checkout on a different subdomain doesn’t see it. It keeps it for as long as your longest active program counts a visit, up to 400 days when a program never expires, or 30 days when no program is active. The visitor’s browser may keep it for less, because some browsers limit what scripts can store. - On a page with Stripe Payment Links, buy buttons, or pricing tables, it adds the visit to each one, including ones that appear after the page loads, so the payment carries it to Stripe. It leaves alone a Payment Link that already has a
client_reference_idof your own. - On Shopify, it adds the visit to the shopper’s cart.
- It never reports a sale. Sales arrive through Stripe’s or Shopify’s webhooks.
Limits
- The line works only while your organization has an active plan. It stops loading a short while after the plan ends, and later for visitors whose browser already holds a copy. From then on, visits aren’t recorded and Payment Links and Shopify carts aren’t stamped, so sales that still arrive from Stripe and Shopify may not be credited to anyone.
- It has no consent handling of its own. If your site needs consent before setting cookies, load the line through your consent tool.
- On a single-page app, a visit is recorded when a referral link opens the page with a full page load. A change of route inside the app doesn’t record a new visit.
- It adds the visit to Payment Links on
buy.stripe.com. Payment Links on a custom domain aren’t covered. - Disconnecting or removing Stripe or Shopify and connecting it again gives the Property a new tracking line, so paste the new one.
If visits don’t show up
- Check that the line is on the page the referral link opens, above
</head>. - Check that the referral code belongs to an active collaborator.
- Check that your organization’s plan is active.
- The line records a referral code once per browser tab. To test again, open the referral link in a new tab.
To check the whole path, open a referral link, then buy through it. The sale shows under Track > Conversions, credited to the collaborator.