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 program.
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:
- Log in to Partnero
- Go to Programs
- Choose your Program if there is more than one
- On the left sidebar, go to Integration under Program
- Copy the Partnero Universal snippet
After copying your unique Partnero Universal JavaScript snippet, follow these steps to log into your BigCommerce account:
- Log in to your BigCommerce account
- Proceed to Storefront and choose Script Manager
- 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.
- Go to Settings
- Locate Advanced section and choose Data Solutions
- 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>