Knowledge Base      


Can I track my upsells and downsells in ClickFunnels using ClickMagick?


Yes, you can.

Similar to how you'd track button clicks to track Actions or Engagements, you can also track Sales when buttons are clicked on.

Here's how:



 
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 icon 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>

  
Note: If your sales page is apart of a marketing funnel and comes after an opt-in, just add your Action Conversion Code to the page.



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

You can get your sales conversion code below or you can navigate to the Tools Menu and select “Website Code”.

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


Update the above cmc_ref and cmc_amt to represent the product that is purchased from your sales page.
 
 
3 - Log The Button Click On The Upsell Page
 
You do this by adding a new line to your Click Tracking Code or Conversion Code. In doing so you will be able to record the “Sale” when the button on your upsell or downsell pages get clicked on.
 
To record a Sale, add both a CSS ID Selector and an amount value for the price of the upsell or downsell, and an optional ref value for the name of the upsells like this:

log_sale: 'cssIDSelector:price:upsellname',
 
To get your CSS ID Selector, you can follow the steps in the article below:

How Do I Find The CSS ID Selector In ClickFunnels?


For example, if the upsell is $20, and is called Golf Clubs the new line of code would look something like:
 
log_sale: 'cssIDSelector:20:golfclubs',
  
With the complete code on the upsell page that sold a $10 product on the front end looking like this:

<script>
    var clickmagick_cmc = {
        uid: '[USERID]',
        hid: '[HID]',
        cmc_goal: 's',
        cmc_ref: 'main',
        cmc_amt: '10',
        log_sale: 'cssIDSelector:20:golfclubs',
    }
</script>
<script src='//cdn.clkmc.com/cmc.js'></script>

 
What happens in this case, is as follows:
 
A Visitor buys the front end offer and makes it to the upsell page. 
 
Once on the upsell page, the $10 sale is recorded immediately.
 
If the buyer clicks on the button to add the upsell to their order, the $20 sale is recorded.
 
If the buyer clicks on “No, thanks...” then the $20 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 button to be the CSS ID Selector, the value and ref value like this:

<script>
    var clickmagick_cmc = {
        uid: '[USERID]',
        hid: '[HID]',
        log_sale: 'cssIDSelector:price:upsell2',
    }
</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: 'cssID:price:name',
    }
</script>
<script src='//cdn.clickmagick.com/misc/js/cmtools.js'></script>


To get the CSS ID of the button, you can follow the steps in the article below:

How Do I Find The CSS ID Selector In ClickFunnels?

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

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

log_sale: 'buttonID:97:baseballTips',

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

<script>
    var cmtools = {
        uid: '[USERID]',
        log_sale: 'cssID:97:baseballTips',
    }
</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 front end sale is recorded immediately.

If the buyer clicks on the button to add the upsell Baseball Tips 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 751 Last updated: 01/10/2022 7:11:16 AM
https://www.clickmagick.com/kb/?article=751