BigCommerce is a platform you can use to create an online store. By connecting your BigCommerce store with your Pinterest tag, you can find out how much traffic Pinterest drives to your store and sales of your products.
The base code allows you to gather data on events, like someone buying a product or adding a product to their shopping basket. The base code must be installed across all pages of your website.
- Enter Pinterest Base Code as the Name of script.
- Enter Pinterest tracking tag as the Description.
- Select Head for Location on page.
- Select All pages for Select pages where script will be added.
- Select Targeting; Advertising for Script category.
- Select Script for Script type.
<script type="text/javascript">
!function(e){if(!window.pintrk){window.pintrk=function()
{window.pintrk.queue.push(Array.prototype.slice.call(arguments))};var
n=window.pintrk;n.queue=[],n.version="3.0";var
t=document.createElement("script");t.async=!0,t.src=e;var
r=document.getElementsByTagName("script")[0];r.parentNode.insertBefore(t,r)}}
("https://s.pinimg.com/ct/core.js");
pintrk('load','YOUR_TAG_ID', { em: '%%GLOBAL_BillingEmail%%', });
pintrk('page');
</script>
After you install the base code, you can add different events to gather additional data. You can add the checkout event to track when people purchase a product and complete transactions.
From your BigCommerce admin, click Advanced Settings and then Web Analytics.
Click the box for Affiliate Conversion Tracking if it is not already clicked and then click> the Affiliate Conversion Tracking tab.
Paste the following code in the Conversion Tracking Code box and replace YOUR_TAG_ID with your own tag ID from
Click Save.
<script type="text/javascript">
!function(e){if(!window.pintrk){window.pintrk=function()
{window.pintrk.queue.push(Array.prototype.slice.call(arguments))};var
n=window.pintrk;n.queue=[],n.version="3.0";var
t=document.createElement("script");t.async=!0,t.src=e;var
r=document.getElementsByTagName("script")[0];r.parentNode.insertBefore(t,r)}} ("https://s.pinimg.com/ct/core.js");
pintrk('load','YOUR_TAG_ID', { em: '%%GLOBAL_BillingEmail%%', });
pintrk('page');
</script>
<script>
pintrk('track', 'checkout',{
value: %%ORDER_AMOUNT%%,
order_quantity:1,
order_id: %%ORDER_ID%%
});
</script>
After you install the base code, you can optionally add different events to gather additional data. You can add the AddToCart event to track when people add products to their shopping carts.
Once you’ve found the code snippet for the button, copy the unique part of the code snippet.
Go back to the BigCommerce editor and find the specific code within the file.
Paste the following code after <input so that the add-to-cart event tag fires any time someone adds a product to their cart:
onclick="pintrk('track', 'addtocart');"
Click Save File at the bottom of the editor.
After saving the file, navigate back to the custom theme you just edited in Store Design.
Click the ellipsis icon and select Apply.