• Home
  • Features  
  • Integrations
  • Pricing
  • Demo

Custom link cloaker compatibility

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

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:

And that this cloaks an affiliate link which supports Smart Labels, for example an Impact link:

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.:

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:

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:

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:

Into this:

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.

Have questions? Contact us at anytime.

Last Updated 2/26/2022

Related articles

Try the affiliate analytics platform for content websites

Affilimate aggregates all your affiliate commissions in one place, and then adds the missing attribution data you need to maximize your affiliate revenue from every post you publish.

Create your dashboard   Get a demo

 Free 15-day trial   No credit card required

Affilimate Analytics App

Hey, I'm Monica.

I'm the co-founder of Affilimate.

Once per month, I send insider tips and strategies for affiliates in this newsletter.

It's short, practical, and original. Try it out:

No spam, unsubscribe anytime.

AffilimateBy Adaero Software