If you've got a custom script or redirection method for your affiliate links, you'll want to make sure to add support for query parameter pass-through yourself.
You'll also probably need to contact our Support team in case our sitemap scan can't pick up your affiliate links. This usually happens if you have a non-standard redirect method, such as client-side redirects using window.location.
Luckily, compatibility pretty easy to set up, but it does require a little custom code, sometimes from both sides.
Here are the main scenarios you'll need to handle:
- Scenario 1: Pass-through external parameters to the cloaked link
- Scenario 2: Handle Partnerize links (if you are using Partnerize)
- Scenario 3: Client-side redirects and custom cloaking scripts
Scenario 1: Pass-through external parameters to the cloaked link
In short, you'll want to pass-through any query parameters Affilimate adds to your cloaked link down to the underlying affiliate link.
You'll need to correctly append the query parameter at the end, and be aware of any encoding considerations depending on the format of the link itself.
For example, let's assume your custom cloaked affiliate link looks something like this:
https://yourwebsite.com/redirect/to-an-affiliate-link
And that this cloaks an affiliate link which supports Smart Labels, for example an Impact link:
https://123.733r.net/abc123
Affilimate will append the correctly formatted query parameter to your cloaked link on the landing page itself.
At that point, it's your link cloakers responsibility to forward that to the underlying link before redirecting the user.
For example, we'll modify your cloaked link into, e.g.:
https://yourwebsite.com/redirect/to-an-affiliate-link?subId3=your-page-slug_amcid-02khsbfds983bf8
You then need to take that extra parameter (subId3) and its value (your-page-slug_amcid-02khsbfds983bf8), and pass it through to the link you redirect the user to:
https://123.733r.net/abc123?subId3=your-page-slug_amcid-02khsbfds983bf8
The SubId name and value is different for every network, so be sure not to hardcode them. Contact Support if you prefer to whitelist specific query parameter names, and we'll provide you with a current list.
In short: Take any extra query parameters that we add to your on-page affiliate links, and append them to your affiliate link before sending the user along. This behavior applies to all affiliate links where we support dynamic SubIDs ("Smart Labels") with one exception.
Scenario 2: Handle Partnerize links (if necessary)
Partnerize appends SubIDs as part of the path of the link, instead of a query parameter.
In this scenario, Affilimate will append the query parameter called
pubref
to your cloaked link. From there, you'll need to modify the underlying link to contain this pubref as part of the path.
For example, Affilimate will add a query parameter like this:
https://yourwebsite.com/redirect/to-a-partnerize-link?pubref=your-page-slug_amcid-02khsbfds983bf8
And you'll need to modify the Partnerize link you redirect the user to so it includes, e.g.
/pubref:your-page-slug_amcid-02khsbfds983bf8/
right after the camref in the URL. So for example, turning this:
https://prf.hn/camref:ABC123/adref:DEF456/
Into this:
https://prf.hn/camref:ABC123/pubref:your-page-slug_amcid-02khsbfds983bf8/adref:DEF456/
Based on whatever value is being sent as the
pubref
parameter.
Scenario 3: Client-side redirects and custom cloaking scripts
If your redirects from your cloaked links to the affiliate link do not use a standard 3XX response code, please contact Support so we can work together on detection of your custom cloaked links or script.
This includes any redirects that are triggered by JavaScript, including e.g. window.location assignments.
Please note that Affilimate currently does not crawl and detect affiliate links which are rendered dynamically by JavaScript on the page, such as Skimlinks and Sovrn.
For both of these networks, we recommend generating the links by hand for better control and tracking.