Knowledge Base      


How do I track upsells and downsells in Kartra?


To get started with tracking your upsells and downsells inside of Karta, follow the steps shown below:


Step 1 - Add Your Click Tracking Code to your sales page


You can get your click tracking code by either clicking on “Website Code” in the Campaigns welcome screen or by clicking on the and clicking “Website Code”.

 

 
You can also get your Click Tracking Code below:

<script>
    var clickmagick_cmc = {
        uid: '[USERID]',
        hid: '[HID]',
    }
</script>
<script src='//cdn.clkmc.com/cmc.js'></script>



Step 2 - Add Your Sales Conversion Code To Your Upsell Page


You can get your sales conversion code below:

<script>
    var clickmagick_cmc = {
        uid: '[USERID]',
        hid: '[HID]',
        cmc_goal: 's',
        cmc_ref: 'productName',
        cmc_amt: 'price',
        log_sale: 'buttonID:price:ref',
    }
</script>
<script src='//cdn.clkmc.com/cmc.js'></script>


Just be sure to replace the cmc_ref and cmc_amt to represent the product that is purchased from your sales page.


Step 3 - Log The Yes Button Click On Your First Upsell Page


You do this by modifying the line in the code above.

You will editing this line of code:

log_sale: 'buttonID:price:ref',

To get the Button ID of the Yes button on your Upsell Page, visit your page in a new tab or window.

Right click on the button and inspect it.

You'll be taken to the code for your button instantly which will look something like this:

 

 
Now you'd just update the price and ref value for the upsell being sold.

So for example, if your upsell is called Six Pack Abs and it sells for $97 you'd modify the line as shown below:

log_sale: 'buttonID:97:sixPackabs',

The complete code on the upsell page that sold a $7 product on the front end would look like this:

<script>
    var clickmagick_cmc = {
        uid: '[USERID]',
        hid: '[HID]',
        cmc_goal: 's',
        cmc_ref: 'main',
        cmc_amt: '7',
        log_sale: 'buttonID:97:sixPackabs',
    }
</script>
<script src='//cdn.clkmc.com/cmc.js'></script>


What happens in this case, is as follow:

A visitor buys the front end offer and makes it to the upsell page.

Once on the upsell page, the $7 sale is recorded immediately.

If the buyer clicks on the button to add the upsell Six Pack Abs to their order, then the $97 sale is recorded.

If the buyer clicks on "No, thanks..." then the $97 sale isn't recorded.

Finally, if you have more than one upsell and downsell... you don't need to add a sales conversion code to every single page.

Just use your Click Tracking Code below, being sure to modify the code with the ID of your button, the price of your upsell or downsell, and the name of it:

<script>
    var clickmagick_cmc = {
        uid: '[USERID]',
        hid: '[HID]',
        log_sale: 'buttonID:price:name',
    }
</script>
<script src='//cdn.clkmc.com/cmc.js'></script>


That's it! When people purchase your upsells and downsells, they'll be tracked instantly inside of ClickMagick.


Step 1 - Tracking Your Front End Offer


To track the front end offer, you'll want to add the Sales Pixel below to your thank you page.

Your Sales Pixel Below:

<script>
var cmPixel = document.createElement('img');
cmPixel.src = "//www.clkmg.com/api/s/pixel/?uid=[USERID]&ref=productName&amt=Price";
</script>
<noscript><img height="1" width="1" style="display:none"
src="//www.clkmg.com/api/s/pixel/?uid=[USERID]&ref=productName&amt=Price"
/></noscript>


Just be sure to edit the ref value and amount with the name and price of your front end offer.


Step 2 - Tracking Your Upsells And Downsells


You do this by tracking the click of the Yes button on your upsell or downsell pages.

Using the Sales Logging Code below and replacing it with the required ID of your button, price and ref value.

<script>
    var cmtools = {
        uid: '[USERID]',
        log_sale: 'myButton:price:name',
    }
</script>
<script src='//cdn.clickmagick.com/misc/js/cmtools.js'></script>


To get the ID of the button, open your upsell or downsell page in a new tab or window.

Right click on the button and inspect it.

You'll be taken to the code for your button instantly which will look something like this:

 

 
Now you'd just update the ID, price, and ref value for the upsell being sold.

So for example, if your upsell is called Six Pack Abs and it sells for $97 you'd modify the line as shown below:

log_sale: 'buttonID:97:sixPack',

The complete code on the upsell page would look like this:

<script>
    var cmtools = {
        uid: '[USERID]',
        log_sale: 'myButton:97:sixPack',
    }
</script>
<script src='//cdn.clickmagick.com/misc/js/cmtools.js'></script>


What happens in this case, is as follow:

A visitor buys the front end offer and makes it to the upsell page.

Once on the upsell page, the $7 sale is recorded immediately.

If the buyer clicks on the button to add the upsell Six Pack Abs to their order, then the $97 sale is recorded.

If the buyer clicks on "No, thanks..." then the $97 sale isn't recorded.

Repeat for your remaining upsells and downsells.

That's it!

When people purchase your upsells and downsells, they'll be tracked instantly inside of ClickMagick.


Article 761 Last updated: 11/23/2021 3:01:04 PM
https://www.clickmagick.com/kb/?article=761