Knowledge Base      


How to track affiliate sales using a landing page?


ClickMagick provides you with two ways to start tracking your affiliate sales when using a landing page. This article explains how to get started with tracking sales in your sales funnel.



To get started with tracking your affiliate sales when using Campaigns you are going to need to follow a few steps.

 
Video Tutorials: How To Track Affiliate Sales Using Campaigns

 
1. Add your Click Tracking Code to your Landing Page: 

You can get your Click Tracking Code by either clicking on “Website Code” in the Campaigns welcome screen or by clicking on the icon and clicking “Website Code”.

  

 
You could also get your Click Tracking Code below:
 
<script>
    var clickmagick_cmc = {
        uid: '[USERID]',
        hid: '[HID]',
    }
</script>
<script src='//cdn.clkmc.com/cmc.js'></script>


2. Add a Visitor ID to Your Affiliate Link using the Affiliate Link Builder

Head to the Tools menu at the top of every page and choose “Affiliate Link Builder”.

 

 
Next, select your affiliate network from the menu, paste your affiliate link into the edit box, set Tracking Type to Campaigns and click on the “Update My Affiliate Link” button.

 

 
Finally, take the modified affiliate link and use it everywhere you would need it on your landing page

If you want to track button clicks, you set it up following the article below:

How do I track link or button clicks off my site?
 
 
3. Add Your Postback URL to Your Affiliate Account

To make sure that your affiliate sales get tracked inside of ClickMagick, you’ll want to add your Postback URL to your Affiliate Account.

To do this, just go to the Postback URL List which you can find in the Tools menu under the subheading “Postback URLs”. Click on the copy button next to the network that you’re using:

 

 
The Postback URLs in your account will be different from what you see in the screenshot above, so copy the URL that you see listed in your account for the network you are using.


4. Create a UTM-Powered Link for your landing page using the URL Builder:

  

 
All you would do now is start to send traffic to your UTM link and you'll be able to see your affiliate sales on the Campaigns Dashboard.
 
Note: You do have the option to create a short link. It is optional and is not required in order to track your affiliate sales inside of Campaigns.




To get started with tracking your affiliate sales on your landing page when using tracking links, you will need to follow a few steps.
 
Note: When using the JavaScript code below across multiple pages, ensure that both the first and last pages of your funnel are on the same domain. This way the [clickid] gets passed to your affiliate links.

For example: The first page of the funnel is on domain.com… and the last page of the funnel is on domain.com.


1. Add the following JavaScript code in the “head” or “body” section of your landing page:

<script src='//cdn.clickmagick.com/misc/js/cmtools.js'></script>

For a walkthrough on adding the JavaScript code to your page builder, view the videos below:

Video Tutorials: How To Add JavaScript Code To Your Landing Page


2. Create a Tracking Link for your landing page 

  
 
 
At the end of your Primary URL you will add query string to pass a [clickid] from your landing page to your affiliate link like this:

https://www.page.com?cm_s1=[clickid]

Here you will use:

?cm_s1=[clickid]


3. Add Your Postback URL to Your Affiliate Account

To make sure that your affiliate sales get tracked inside of ClickMagick, you’ll want to add your Postback URL to your Affiliate Account.

To do this, just go to the Postback URL List which you can find in the Tools menu under the subheading “Postback URLs”. Click on the copy button next to the network that you’re using:

 

 
The Postback URLs in your account will be different from what you see in the screenshot above, so copy the URL that you see listed in your account for the network you are using.


4. Edit the affiliate links on your landing pages

When your new tracking link gets clicked on, it will generate a unique [clickid] that gets stored as a value in the cm_s1.

To pass this value to your affiliate links, you will modify the links to accept them.

To make sure your affiliate link is setup correctly, use the Affiliate Link Builder which you can find in the Tools Menu at the top of the page.

Select your Affiliate Network, set Tracking Type to Tracking Links, and enter your Affiliate Link in the input field shown, then click “Update My Affiliate Link” as shown below:
 


Once you have your affiliate link, simply replace the [clickid] with [cm_s1] like this:

https://xxx.yyy.hop.clickbank.net?tid=[clickid]

Will now be:

https://xxx.yyy.hop.clickbank.net?tid=[cm_s1]

The updated affiliate link is what you will use on your Landing Page. 
 
If you want to track button clicks, you set it up following the article below:

How do I track link or button clicks off my site?
 
 
That’s it! You should now be able to track your affiliate sales when using a landing page.
 
Note: To learn more about how the cmtools.js code works, read this:

How does the JavaScript cmtools.js code work?



Article 684 Last updated: 07/17/2021 8:50:20 AM
https://www.clickmagick.com/kb/?article=684