Skip to main content
November 9, 2026

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. If you have more than one program, select it in the program switcher in the top right corner of the page. If you are a team member, you need the Manage program settings permission to see Programs.
    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. It doesn’t stop affiliates from changing their referral codes: see When a click doesn’t reach the affiliate.
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.
Migrating from another platform? Custom links also let your existing affiliates keep the links they have already shared. If their old links point to your own website (for example, https://yoursite.com/partner/johndoe), save each affiliate’s existing identifier (johndoe) as their short_code metadata, put that identifier in your lookup table instead of a newly generated short code (step 1), and use the same format for your landing page URL. Links already published in emails, blogs and social posts keep working, and your website maps them to the right affiliate using the steps below.

Implementation Steps:

  1. Generate Short Codes: Use a trigger, for example on the Affiliate approved for program event filtered to the program from step 3 (without the filter, approvals in your other programs come too), 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. As the tracking parameters, save the asset ID and source ID of the affiliate’s link rather than their referral code: they stay the same when the affiliate changes their referral code. The REST API returns both as asset_id and source_id in the affiliate’s referral_link (API version 1.5 and later), for example with Retrieve an affiliate in a program. The event can come again for the same affiliate, for example when they are disapproved and then approved again: keep the short code they already have (step 2).
  2. Save as Metadata: Store this short-code as affiliate metadata using a key like short_code. Never replace a short code an affiliate already has, including an identifier you migrated: their custom link is built from it, so a new short code changes the link they have already shared.
  3. Update Landing Page URL: Go to Programs > General settings. If you have more than one program, select it in the program switcher in the top right corner of the page. If you are a team member, you need the Manage program settings permission to see Programs. Change the Landing page url to include the metadata value: https://yoursite.com/partner/${affiliate.meta_data[short_code]}. Use the same program in step 4. Before this step, put the code from steps 5 and 6 on your website and fill your lookup table (see When a click doesn’t reach the affiliate): from this step on, affiliate links lead to your custom pages.
  4. Set Tracking to “Custom”: Navigate to Programs > Advanced (if you have more than one program, select it in the program switcher in the top right corner of the page) and set the tracking method to “Custom” to ensure standard parameters are removed from the URL. If you are a team member, you need the Manage program settings permission to see Programs. The video also switches Referral codes to Off before saving. You don’t need to: with the Custom tracking method, this setting doesn’t change your affiliates’ links. They stay the landing page URL you set in step 3.
  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: Load the Tapfiliate tracking script on that page (Setup on the developer portal) and on these pages call tap('click') instead of tap('detect'), with the parameters from your lookup table: { asset_id: '...', source_id: '...' }, or { referral_code: '...' } if your table stores referral codes. See click on the developer portal.

When a click doesn’t reach the affiliate

Your website can record a click for the right affiliate only with tracking parameters that still belong to them. In two cases it can’t: the click isn’t recorded for that affiliate, Tapfiliate doesn’t warn you, and a purchase that follows can’t be credited to the affiliate through this visit.
  • The identifier isn’t in your lookup table. The trigger from step 1 fires only for events that happen after you set it up. Affiliates who joined or were imported before that, for example affiliates you migrated from another platform, aren’t in the table unless you add them, and neither is an affiliate whose webhook never reached your endpoint or whose trigger run failed, for example because your plan’s trigger limit was reached. Give every affiliate who is already in the program a short code yourself, unless they already have one (step 2), save it as their metadata and add them to the table, not only the ones the trigger sends. Do it, together with the code from steps 5 and 6, before you change the landing page URL in step 3: from then on, affiliate links lead to your custom pages. List all affiliates in a program returns each affiliate’s asset_id and source_id. It returns them page by page, and an affiliate can be skipped if someone leaves the program while you go through the pages: go through the list again until a pass adds no one. After the switch, repeat this from time to time: an affiliate approved later can still be missed, for example when a trigger run fails. Your website finds nothing for a missing identifier, and no click is sent.
  • The affiliate changed their referral code. Custom links don’t stop affiliates from changing their referral code in their dashboard. Their custom link stays the same, but the old code stops working for them at once. If your table stores referral codes, your website keeps sending the old code: Tapfiliate doesn’t record the click, or, once another affiliate in your account takes that code, records the click for that other affiliate, and a purchase that follows can be credited to them. Store the asset ID and source ID instead (step 1): they don’t change with the referral code. If you keep referral codes in the table, nothing tells you that an affiliate changed theirs: no trigger fires for it.

Next Steps