Affiliate order tracking for BigCommerce

This guide provides detailed instructions on how to integrate Partnero affiliate program into BigCommerce websites for straightforward order tracking.

Please note that before proceeding with the integration, you should already have an affiliate program created on Partnero. If you haven't created a program yet, refer to our guide on creating an affiliate programopen in new window.

Visitors tracking

Visitor tracking enables the identification of referral visits to your website.

For accurate tracking and attribution of referral visits and signups to the appropriate partners, you need to install the Partnero Universal script on your website as custom code.

To find the snippet, please follow these steps:

  1. Log in to Partneroopen in new window
  2. Go to Programs
  3. Choose your Program if there is more than one
  4. On the left sidebar, go to Integration under Program
  5. Copy the Partnero Universal snippet

After copying your unique Partnero Universal JavaScript snippet, follow these steps to log into your BigCommerce account:

  1. Log in to your BigCommerce account
  2. Proceed to Storefront and choose Script Manager
  3. Create a new script by clicking Create a script button

Chose the following:

  • Script name: Partnero Universal (or you can name it yourself)
  • Placement: Header
  • Location: All pages
  • Script category: Analytics
  • Script type: Script

Insert the Partnero Universal Script into the Script contents section.

Example of Partnero Universal

<!-- Partnero Universal -->
<script>
    (function(p,t,n,e,r,o){ p['__partnerObject']=r;function f(){
    var c={ a:arguments,q:[]};var r=this.push(c);return "number"!=typeof r?r:f.bind(c.q);}
    f.q=f.q||[];p[r]=p[r]||f.bind(f.q);p[r].q=p[r].q||f.q;o=t.createElement(n);
    var _=t.getElementsByTagName(n)[0];o.async=1;o.src=e+'?v'+(~~(new Date().getTime()/1e6));
    _.parentNode.insertBefore(o,_);})(window, document, 'script', 'https://app.partnero.com/js/universal.js', 'po');
    po('settings', 'assets_host', 'https://assets.partnero.com');
    po('program', 'PUBLIC_PROGRAM_ID', 'load');
</script>
<!-- End Partnero Universal -->

Sales tracking on checkout

Set up order tracking during the checkout.

  1. Go to Settings
  2. Locate Advanced section and choose Data Solutions
  3. Choose Affiliate Conversion Tracking

Paste the following script into Connection area and click Connect.

<script>
po('transactions', 'create', {
    data: {
      key: '%%ORDER_ID%%',
      amount: %%ORDER_AMOUNT%% ,
      customer: {
        key: '%%ORDER_EMAIL%%',
        email: '%%ORDER_EMAIL%%' 
      }
    },
    options: {
      create_customer: true
    }
  });
</script>