REFERRALS
Pixel tracking installation
Generic tracking pixel instructions
8 min
if your brand isn't using one of pixel tracking installation docid 8lvuc9wqsxlirhykmp53k ecommerce platforms, then you will need to manually install roster's link tracking and order tracking pixels this guild will cover installing roster's link tracking pixel and roster's order tracking pixel, both of which are required to be installed to use roster's sales attribution features such as tracking link clicks, attributing referrals to ambassadors, and creating referral rewards google tag manager we strongly discourage installing roster's tracking pixels through google tag manager (gtm) more and more browsers and extensions block gtm from loading, thereby blocking roster's tracking pixels from working we recommend installing roster's tracking pixels directly in your e commerce platform or website's global theme/template step 1 get a public access api token each of the two tracking pixels require a public access token in order to securely send tracking data from a customer's browser to your roster account you can use the same public access token for both tracking pixels log into your roster account go to the api integration page by clicking on your brand's name in the left hand navigation, then integrations > api integration copy the newest public access token if one exists, or click new access token to create a new one never use private access tokens with roster's tracking pixels public access tokens are safe to use in a browser environment, but private access tokens are only intended for server side usage as they allow full access to all roster api endpoints step 2 install the link tracking pixel roster's link tracking pixel tracks link clicks from ambassadors' referral links and stores ambassadors' referral link ids in the browser to track subsequent purchases copy the following javascript tag to your clipboard \<! roster > \<script async type="application/javascript" src="https //sa getroster com/sa js?token=access token">\</script> paste the javascript tag just before the closing \</head> tag in your e commerce platform or website's global template replace access token in the javascript tag with the public access token from step 1 above be sure you install the link tracking pixel in a way that will allow it to run on each page load this will ensure that regardless of which url ambassadors share as their referral link, roster will capture incoming link clicks and store the referral link ids for purchases made by referred customers step 3 install the order tracking pixel roster's order tracking pixel is an order aware javascript pixel that needs to be installed on the order confirmation page (the page that loads immediately after a customer completes a purchase ) copy the following javascript tag to your clipboard \<! start roster order submission > \<script type="application/javascript"> function submitorder() { if (sattribution) { sattribution set({ orderdate "2024 01 12t12 59 59", // recommended; format the date as yyyy mm ddt00 00 00; defaults to the current datetime if not provided orderid "123456", // required ordernumber "56789abc", // recommended if your platform has both a numeric id and a user friendly order number; defaults to orderid if not provided currency "usd", // required subtotalprice 17 00, // recommended; it should be the order total after discounts have been applied, but before taxes and shipping; this is used by roster to calculate commissions; defaults to totalprice if not provided totalprice 29 99, // required discountcodes \["sale2020", "janedoe123"], // recommended; used by roster to track code usage and sales attribution email "john doe\@email com", // required; this is used by roster's sales attribution logic customerid "9876abc", // recommended; this is used to help determine if a customer is new or existing firstname "john", // optional lastname "doe", // optional }); sattribution emitorder(); } } var sascript = document createelement("script"); sascript addeventlistener("load", submitorder); sascript src = "https //sa getroster com/sa js?token=access token"; document body appendchild(sascript); \</script> \<! end roster order submission > paste the javascript tag just before the closing \</head> tag on the order confirmation page or the page that loads upon a successful conversion replace access token in the javascript tag with the public access token from step 1 above step 4 verify the installation process it's imperative that you test the link tracking and order tracking upon completing the above steps see verify tracking pixel installation docid\ hszdrydoq2cmtkv8cxbwp for a video walkthrough and detailed steps need help? if you have any questions about adding hidden products to product rewards, contact us at support\@getroster com mailto\ support\@getroster com