Browse by Topic

Setting up Conversion and Affiliate Tracking

If you are spending a lot of resources on a particular advertising campaign or you've spent time setting up an affiliate marketing program, it's important to implement tracking to find out if they are worth the effort.

Conversion and affiliate tracking is the process of placing a small piece of code in your store to track how your shoppers interact with specific elements or when a purchase is made.

This data can be passed to an affiliate or third-party program, such as Google Analytics or Facebook Ads, through the conversion tracking code they provide. The programs can then perform further analysis on the data to provide insight on improving conversion, outlining common visitor flow patterns, and identifying which advertising or marketing resources are not working well, so you can concentrate on the ones that do work.

 
 

Tracking Code Variables

Affiliate tracking codes contain placeholders to pass order information, such as the order's total and order ID, back to the affiliate tracking program. You will need to replace the placeholders with one of the corresponding tracking variables below. At this time, these are the only variables available for conversion tracking. 

  • %%ORDER_AMOUNT%% — The order total in dollars/cents.
  • %%ORDER_AMOUNT_IN_CENTS%% — The order total in cents.
  • %%ORDER_SUBTOTAL%% — The order subtotal in dollars/cents.
  • %%ORDER_SUBTOTAL_IN_CENTS%% — The order subtotal in cents.
  • %%ORDER_SUBTOTAL_DISCOUNTED%% — The order subtotal in dollars/cents, minus coupons and other discounts.
  • %%ORDER_SUBTOTAL_DISCOUNTED_IN_CENTS%% — The order subtotal in cents, minus coupons and other discounts.
  • %%ORDER_ID%% — The order ID.
  • %%ORDER_EMAIL%% — The customer's e-mail address.
 
 

Installing the Tracking Code

To insert a conversion tracking code, go to SettingsData solutions, and click Connect next to Affiliate Conversion Tracking.

Paste your code into the Conversion Tracking Code box and click Connect when you are done.

Conversion tracking code box

 

Scripts added to Affiliate Conversion Tracking only affect the order confirmation page. If you need a script to work on other store pages, add it to the Script Manager, or to one of the other Web Analytics tools in Data Solutions.

If you have multiple conversion codes, you can paste them above or below any existing codes to ensure they don't interfere with each other. Once the code has been pasted, locate the placeholders in your code and replace them with the corresponding variables. You need at least one variable, or you will not be able to save the conversion code.

Replacing variables demonstration

In the animation above, we filled in the placeholder for the affiliate company name with the name it will populate in the tracking program.

 
 

FAQ

How do I remove everything from the Conversion Tracking Code box?

When removing the code, leave a single blank space behind and click Save. You will be presented with a warning box. Click OK to finish saving.

What should I do if my tracking code is asking for a confirmation URL?

Some tracking scripts will require you to specify the page a customer lands on after an order has been placed. This URL will differ depending on whether you are using Optimized One-Page Checkout or Legacy Checkout.

If you have a custom domain, your checkout destination URL will look like this:

  • Single/multiple page checkout — https://www.yourdomain.com/finishorder.php
  • Optimized One-Page Checkouthttps://www.yourdomain.com/checkout/order-confirmation

If you are using the mybigcommerce.com domain (not a custom domain), your checkout destination URL will look like this:

  • Single/multiple page checkout — https://######.mybigcommerce.com/finishorder.php
  • Optimized One-Page Checkouthttps://######.mybigcommerce.com/checkout/order-confirmation

Was this article helpful?