Custom affiliate links

We have an existing feature which allows your affiliates to setup personalized links called ‘referral codes’ in the platform. When referral codes are set up, affiliate links will look like https://your-site.com/?ref=[johndoe]. Your affiliates can customize referral codes from their end.

This guide is for those who want to setup customized links which can’t be changed from the affiliates end, and for those seeking to get rid of the ?ref= part of the link.

Note: Custom links are an advanced feature. You will need the help of a developer to help implement this.

  1. Use e.g. a trigger to call an API on your end, that generates the affiliate short code and saves it in a lookup table, together with the affiliate’s tracking parameters which you can get from the trigger. Alternatively, if you are using a custom affiliate sign up form and are creating affiliates through the API, you can save the short code and tracking parameters on your end, without needing the trigger.
  2. Save the short-code as affiliate metadata, e.g. using the key: short_code
  3. Update your landing page URL to include the value from the metadata. Eg. https://yoursite.com/partner/${affiliate.meta_data[short_code]}
  4. Set your tracking method to “custom” in your program’s advanced settings. This will ensure that all our tracking parameters are removed from the URL. You can find your program’s advanced settings, by going to Programs (left hand menu) > Click the gear icon next to your program > Advanced.
  5. On your website, create a piece of code that checks the URL component’s value to retrieve the affiliate’s tracking parameters from the lookup table
  6. Use those parameters to track a click using our tracking code:

    <script src="//tapfiliate.com/tapfiliate.js" async="" type="text/javascript"></script>
    <script type="text/javascript">
    (function(t,a,p){t.TapfiliateObject=a;t[a]=t[a]||function(){
    (t[a].q=t[a].q||[]).push(arguments)}})(window,'tap');
    tap('create', 'YOUR ACCOUNT ID');
    
    var trackingParam = {
    referral_code: '...' // Get from your lookup dictionary
    };
    
    tap('click', trackingParam);
    </script>
    

Note: Customized affiliate links cannot be setup if you are using the redirect tracking method. If you are using this method, please contact support, as there are important changes that might affect you.