Tracking Cookies
JavaScript SDK
I owned this entire guide from start to finish.
For this endeavour I researched and familiarized myself with First-party cookie recipes.
Any links to guides I did not author have been removed for this archived version below.
As of June 2020, SaaSquatch has enabled the usage of 1st Party Cookies to accommodate a wider industry shift towards the increased protection of end user privacy.
SaaSquatch uses first-party cookies for referral attribution—the process of connecting a referred participant to the person who made the referral. The cookies are based on UTM parameters passed through the URL. By placing squatch.js on your landing page, it is able to read the UTM parameters and create a valid first-party cookie that’s in compliance with all browsers.
Attribution Preference Hierarchy
As there are several ways to attribute a referred participant to a referrer, the connection will always be linked following the below scheme:
- Explicit inclusion of a referredByCodes either via
squatch.jsor the REST API will always override any identified cookie. - If a referral code is not included directly with a user upsert, then
squatch.jswill look for the first-party cookie and make the attribution. - If no first-party cookie exists and a third-party cookie is available through a compatible browser, the 3rd-party cookie will be detected and applied.