Skip to main content

BigCommerce Integration

Track affiliate clicks and orders on a BigCommerce store.

To successfully integrate tracking for your BigCommerce store, you should first complete the instructions in the Quick Setup section of your Trackdesk system. Once that is done, follow this guide to set up tracking for both clicks and conversions.


​

Step-by-step instructions

Step 1: Set up click tracking

First, add the click tracking script to the header of every page of your store, so the click is recorded before the visitor can leave the page.

  1. In your BigCommerce admin, go to Storefront → Script Manager.

  2. Click the Create a Script button.

  3. Fill in the following details:

    • Script name: Trackdesk click tracking

    • Placement: Header

    • Location: All pages

    • Script category: Essential

  4. Paste the following script into the script box and click Save:

    <!-- Trackdesk tracker begin -->
    <script async src="//TENANT_ID.trackdesk.com/main.js"></script>
    <script>
    (function(t,d,k){(t[k]=t[k]||[]).push(d);t[d]=t[d]||t[k].f||function(){(t[d].q=t[d].q||[]).push(arguments)}})(window,"trackdesk","TrackdeskObject");

    trackdesk("TENANT_ID", "click");
    </script>
    <!-- Trackdesk tracker end -->

    Replace both occurrences of TENANT_ID with your Tenant ID.

Step 2: Set up conversion tracking

Next, connect your conversion tracking to capture successful orders.

  1. Navigate to Settings → Data solutions and click Connect next to Affiliate Conversion Tracking.

  2. Paste the following code into the Conversion Tracking Code box and click Connect when finished:

    <!-- Trackdesk tracker begin -->
    <script async src="//TENANT_ID.trackdesk.com/main.js"></script>
    <script>
    (function(t,d,k){(t[k]=t[k]||[]).push(d);t[d]=t[d]||t[k].f||function(){(t[d].q=t[d].q||[]).push(arguments)}})(window,"trackdesk","TrackdeskObject");

    trackdesk("TENANT_ID", "conversion", {
    conversionType: "CONVERSION_TYPE",
    externalId: "%%ORDER_ID%%",
    customParams: {
    advS1: "%%ORDER_EMAIL%%"
    },
    amount: {
    value: "%%ORDER_AMOUNT%%"
    }
    });
    </script>
    <!-- Trackdesk tracker end -->

    Replace these values:

    • TENANT_ID: your Tenant ID (in both places)

    • CONVERSION_TYPE: the code of your Conversion Type, for example sale

    Keep the BigCommerce variables (%%ORDER_ID%%, %%ORDER_EMAIL%%, %%ORDER_AMOUNT%%) as they are.

Customizing order amounts

If you prefer to track different order values, for example, the total excluding coupons or other discounts, you can use different BigCommerce variables instead of %%ORDER_AMOUNT%%. Please refer to the BigCommerce documentation for a full list of available variables.


​

Testing your integration

Before launching your program, it's important to verify that clicks and conversions are being tracked correctly. You can perform a test by following the standard Trackdesk testing steps to ensure everything is connected properly.

Did this answer your question?