Learn how to set up your referral/affiliate program with CodeQR Partners.
@codeqr/analytics
client-side SDK@codeqr/analytics
client-side SDKcq_id
query parameter and storing it as a first-party cookie, which will be used to attribute subsequent conversion events to the original link.
?via=john
)@codeqr/analytics
script in several different ways:
_codeqrAnalytics
– if the script is installed correctly, you should see the _codeqrAnalytics
object in the console.?cq_id=test
query parameter to your website URL and make sure that the cq_id
cookie is being set in your browser.<head>
section of the page/track/click
request in your browser’s Network tab (and no errors in the Console tab).cq_id
cookie is being set upon a successful /track/click
request.lead
event. This happens when a user performs an action that indicates interest in your product or service. This could be anything from:
Sign Up
, which happens when a user signs up for an account. Depending on which authentication framework you’re using, here are a few examples of how to send Sign Up
lead events:
The lead event will serve as the source of truth for the customer’s identity and which link they came from. This means that all subsequent actions performed by the customer (e.g. upgrading their plan, purchasing a product) will automatically be attributed to the original link.
To learn more about tracking lead events with CodeQR, refer to the following resources:
sale
event. This happens when a user purchases your product or service. This could be anything from:
POST /track/sale
API endpoint.
To learn more about tracking sale events with CodeQR, refer to the following resources: