Integrate Trackdesk with Google Tag Manager (GTM) using our JavaScript based solution. This integration allows you to enable click and conversion tracking for your affiliate program
⚠️ Important:
First, you will need to create an Offer. More information on how to create an offer here.
1. Step-by-Step Instructions
Step 1: Locate Your Tracking Codes
First, retrieve the necessary scripts from Trackdesk:
Navigate to Offer > Offer List and select your specific Offer.
Open the Integrations tab.
Under the Advanced Integrations section, click on Tracking Code.
Here, you will find two main types of scripts:
Click Script: Tracks when a user clicks an affiliate link.
Conversion Scripts: Tracks specific actions (e.g., Sale, Lead). You will see unique scripts for each conversion type you have configured for the offer.
Click Show Details on the relevant script to reveal the code block.
Step 2: Setting up Clicks in GTM
The Click Script must fire on all pages where you want to track incoming affiliate traffic.
In GTM, create a new container and click New Tag.
Name your tag and click the edit icon in the top right corner to modify the Tag Configuration.
Select Custom HTML from the tag type list.
Paste your Trackdesk click tracking script from Step 1 into the HTML field.
Go to the Triggering section and set the trigger to fire the script on All Pages.
Click Save in the top right corner.
Step 3: Setting up Conversions in GTM
Conversion scripts should fire only after a user completes a specific action (e.g., a purchase or lead signup). This is typically achieved by setting the tag to trigger on your 'Order Confirmation' or 'Thank You' page.
Click New Tag and select Custom HTML as you did in Step 2.
Copy the specific Conversion script (e.g., Sale, Lead) from your Trackdesk Offer.
Paste the conversion script into the Custom HTML field.
Click Triggering to define when this tag should fire:
Click the + icon to create a new trigger.
Click on "Trigger Configuration"
Select Page View as the trigger type.
Set the trigger to fire on Some Page Views.
Define the condition (e.g.,
Page URL contains /thank-youorsuccess).
Click Save and publish your workspace changes.
2. Testing Your Integration
Please remember to test the creation of a click and a conversion before starting your program. This way, you can verify that tracking has been set up correctly. You can create a test click and conversion by following the steps described here.














