Skip to main content

Customizing Affiliate Links: From Referral Codes to Vanity URLs

Take full control over how your brand is shared. Whether you want to let affiliates personalize their links or you need a fully custom, "clean" URL structure without parameters, this guide covers every level of link customization.

Nina avatar
Written by Nina
Updated this week

What’s in this guide?

  1. Personalized Referral Codes: How to let affiliates change their own link identifiers.

  2. Anonymizing Links: How to switch to secure, non-descriptive tracking parameters.

  3. Vanity & Custom Links: An advanced, developer-led approach to removing ?ref= entirely.


Personalized Referral Codes

Standard affiliate links typically look like this: https://your-site.com/?ref=nlmjdis.

  • Affiliate Customization: You can allow affiliates to change the random string (e.g., nlmjdis) to something that reflects their brand (e.g., ?ref=johndoe). If your affiliates would like to change their referral code, refer them to this article: Editing the Referral Parameter in Your Link

  • How to manage: Affiliates can personalize these codes from their own dashboards, ensuring the link is easier to share and recognize.


Anonymizing Your Links

If you prefer links that do not show names or recognizable codes, you can issue anonymized links consisting of two parameters (tap_a= and tap_s=) followed by strings of letters and numbers.

  • How to enable:

    1. Go to Programs > Advanced.

    2. Toggle the Referral codes option to Off.


Technical Guide: Setting Up Custom Affiliate Links

This advanced feature is for users who want to get rid of the ?ref= part of the link entirely or prevent affiliates from changing their codes.

Note: Custom links are an advanced feature. You will need the help of a developer to implement this. These cannot be set up if you are using the redirect tracking method.

Implementation Steps:

  1. Generate Short Codes: Use a trigger to call an API on your end that generates an affiliate short code and saves it in a lookup table alongside the affiliate’s tracking parameters.

  2. Save as Metadata: Store this short-code as affiliate metadata using a key like short_code.

  3. Update Landing Page URL: Modify your landing page URL in Tapfiliate to include the metadata value: https://yoursite.com/partner/${affiliate.meta_data[short_code]}.

  4. Set Tracking to "Custom": Navigate to Programs > Gear Icon > Advanced and set the tracking method to "Custom" to ensure standard parameters are removed from the URL.

  5. Retrieve Parameters: Create code on your website that checks the URL component's value to retrieve the tracking parameters from your lookup table.

  6. Track the Click: Use those parameters to track a click with the following 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>

Next Steps

Did this answer your question?