Every publisher has their own format of presenting affiliate links on their website. Therefore, enabling an Affiliate Link Click tracking event in Permutive will require a little bit of development time from you, in order to extract and map all of the relevant data points.
While we are unable to write a custom Affiliate Link Click tracker for you, we are more than happy to guide you through the process and help you verify your deployment.
Understanding your set up
Firstly, you need to make sure you know the exact format of all the affiliate links you want to collect. This includes having an exhaustive list of the following from all the domains where you want to collect Affiliate Link Click Event information:
- Affiliate link formats
- Affiliate link partners
Once you have that, you will be able to create a schema of an Affiliate Link Click event in Permutive. The following data points are a minimal requirement:
- Affiliate partner
- Destination URL
If possible to extract from the page, you may also want to send in parameters such as:
- Product name
- Product categories
- Product price
- Product currency
It is highly recommended that affiliate links are presented in a uniform format on your web page, for example in a container that always has the same name. This will ensure that Affiliate Link Clicks can always be found by your script, and no other links will be tracked as affiliate links.
An example of this could look like:
Creating a schema in Permutive
As you will be creating a new event "AffiliateLinkClick" in Permutive, before any data can be sent in, you will need to create the event and the appropriate custom fields in the UI. If unsure on how to do this, please read this explanation or reach out to email@example.com .
You will also find it useful to read through our Collecting Custom Events documentation.
An example tracking call can look something like:
"categories": ["<LIST>", "<OF>", "<STRINGS>"],
Tracking the AffiliateLinkClick event
Please refer to our SDK documentation to understand how to track events in Permutive.