Add dynamic tracking ID to affiliate link

You can set up static Tracking IDs to your affiliate links here WordPress Admin Area > Datafeedr API > Networks. This article explains how to add dynamic Tracking IDs to your affiliate links.

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.

Affiliate IDs vs. Tracking IDs

Your Affiliate ID is a unique ID added to the affiliate link which lets the affiliate network know that you referred a sale. The code mentioned in this article does not modify in any way your affiliate ID.

Your Tracking ID is a snippet of text inserted into the affiliate link which allows you to further track where the referral came from, how it was generated and/or who was responsible for making the 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.

Still need help? Contact Us Contact Us