Knowledge Base      


How do I track BigCommerce sales in ClickMagick?


Here’s how to set up tracking with BigCommerce …


Step 1 – Add your Click Tracking Code

Copy your click tracking code below:

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


Be sure to change NameOfYourProject between the 's to your project’s name.

Inside BigCommerce, head to the Script Manager by going to Storefront > Script Manager. And create a new script:

 

 
Give your script a name like "ClickMagick Tracking Code"

Location: Head

Select pages where the script will be added: Store pages
 
Note: Adding your code to the store pages will add the code to all pages that aren't checkout or order confirmation.


Category: Essential

Script Type: Script

And add your Click Tracking Code:

 


 
Note: If you plan on getting traffic organically, you’ll want to use the Organic Click Tracking code instead of the code shown above. For more info, please checkout the article below:

How do I track organic traffic with Campaigns?


Once that is done, save your changes.


Step 2 – Add your Engagement Tracking Code

To do this, just create a new script from the Script Manager.

Name: ClickMagick Engagement Code

Location: Head

Select Pages: Checkout

Script Category: Essential

Script Type: Script

Use your Engagement Conversion Code Below:

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


This will track the people that make it to the checkout page as Engaged in Campaigns.
 

Step 3 – Add your Sales Tracking Code

Click on Settings > Data Solutions (Under Advanced) > and select Affiliate Conversion Tracking.

Use your Sales Conversion Code Below:

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

 

And that's it! With the above set up, you can now track your BigCommerce sales.


Optional Dynamic Tracking Tokens

In almost all cases, the sales tracking code we provided in step 3 is recommended. However, if you’d like to track other values such as the order number or order subtotal, you can use these tokens in your sales tracking code:
 
%%ORDER_AMOUNT%% Order total in dollars/cents
%%ORDER_AMOUNT_IN_CENTS%% Order total in cents
%%ORDER_SUBTOTAL%%          Order subtotal in dollars/cents
%%ORDER_SUBTOTAL_IN_CENTS%% Order subtotal in cents
%%ORDER_SUBTOTAL_DISCOUNTED%% Order subtotal in dollars/cents, minus coupons and other discounts
%%ORDER_SUBTOTAL_DISCOUNTED_IN_CENTS%%       Order subtotal in cents, minus coupons and other discounts
%%ORDER_ID%% Order ID
%%ORDER_EMAIL%% Customer’s email address

In the example below, we’re tracking the order number as the “ref” value and order subtotal as the amount:

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


Note that the customer’s email address is already collected automatically via the code on your checkout page.

Article 756 Last updated: 02/10/2024 9:10:41 AM
https://www.clickmagick.com/kb/?article=756