Add a Tracking (Sub) ID to affiliate link

You can pass a Tracking ID (also known as Sub ID) via your affiliate links to the affiliate network's tracking system. The value you pass will then be posted for each sale in your affiliate network's sales stats.

Affiliate IDs vs. Tracking (Sub) IDs

  • Your Affiliate ID is a unique ID assigned by the network and is required in each affiliate link. It lets the affiliate network know that your site referred a sale. 
  • Adding a Tracking ID / Sub ID  is optional and is a custom value you can add to your affiliate links. It allows you to further track where the sale came from, how it was generated and/or who was responsible for making the purchase.
WARNING: Note that each network has its own Tracking ID / Sub ID rules so check in advance what is allowed and what is not allowed! Adding non-allowed values may break your affiliate links!

To add a static Tracking ID to your affiliate links:

  • Go to WordPress Admin Area > Datafeedr API > Networks. 
  • Then open up your selected network(s). 
  • If a Tracking ID field is available it means the network allows you to pass a Tracking ID.

Here's how to add dynamic Tracking IDs to your affiliate links via custom code. The code below does not modify in any way your affiliate ID.

In this example, we will add the ID of the user who is logged into your site to the affiliate link so that you can track which of your logged in users has made a purchase.

1

Create a custom plugin

If you haven't done so already, create a custom plugin.

2

Add custom code

Add the following custom code to your custom plugin.

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.

Still need help? Contact Us Contact Us