Knowledge Base      


How do I add tracking pixels or JavaScript code to BigCommerce?


To get started with tracking BigCommerce, just follow the steps below...

Step 1 - Add Your Click Tracking Code To Your Store Pages

Copy your click tracking code below:

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


And inside of 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 script will be added: Store page
 
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 Conversion 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>
    var 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 Conversion Code

Create a new script from the Script Manager.

Name: ClickMagick Sales Code

Location: Head

Select Pages: Order Confirmation

Script Category: Essential

Script Type: Script

Use your Sales Conversion Code Below:

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

 
And that's it! With the above setup you'll be able to track your BigCommerce sales.

Article 756 Last updated: 10/17/2021 6:35:20 PM
https://www.clickmagick.com/kb/?article=756