All Collections
Referrals & Tracking
Referral Tracking Setup
Enable Cookies In Your Referral Tracking Script
Enable Cookies In Your Referral Tracking Script
Libby Serra avatar
Written by Libby Serra
Updated over a week ago

*Note: When following these steps be sure to begin by referencing the instructions outlined in this article.

The Roster referral tracking script has the capability to track referral link clicks across sub-domains. If your eCommerce setup involves multiple sub-domains then follow these instructions to enable cookie tracking. For example, your visitor comes to your root domain "mystore.com" and then the purchase process redirects to "shop.mystore.com". Cookies are used to track referral information across sub-domains.


Update Your Main Link Tracking Script

To enable cookie tracking you need to include query string parameters in the script's URL for "cookies" and "domain" settings.

  • cookies=true: enables the cookie tracking functionality in your embedded script.

  • domain=mystore.com: tells us what your root domain is. Cookies are tracked across sub domains based on the root domain you specify here. Cookie tracking won't work without this setting.

Update your root tracking pixel as follows:

<!-- Roster -->
<script async type="application/javascript" src="https://sa.getroster.com/sa.js?token=ACCESS_TOKEN&cookies=true&domain=ROOT_DOMAIN"></script>

*Set your Access Token: be sure to replace the ACCESS_TOKEN placeholder with your public access token.

*Set your Root Domain: be sure to replace the ROOT_DOMAIN placeholder with your domain. For example: mystore.com


Step 3. End to End Testing

You're done! Next it's time to test and verify things are setup properly.

View this article for steps on how to test your referral tracking script installation.


Troubleshooting and other Related Information

See Troubleshooting Referral Tracking Issues for more details on possible reasons why referrals are not always being tracked on your site.

How Recent Updates in ITP Impact Referral Tracking

With the latest browser updates in Intelligent Tracking Prevention (ITP), users can set their browsers to ensure third-party cookies are blocked by default. This prevents sites from tracking information about the visitor. Some browsers have this setting enabled by default.

This means that if you enable cookie tracking on your website, a visitor could see a popup asking them to allow cookies on your site. If they don't allow cookies, then the referral tracking will not work.

Did this answer your question?