Squarespace is a platform you can use to create an online store. By connecting your Squarespace 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.
From your Squarespace admin, navigate to Settings.
Click Advanced and then click Code Injection.
Paste the following code in the Header. If there's is already code in this box, paste your tracking code after it:
<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','YourTagID', { em: '{customerEmailAddress}', });
pintrk('page');
</script>
<noscript>
<img height="1" width="1" style="display:none;" alt=""
src="https://ct.pinterest.com/v3/?tid=YourTagID&noscript=1" />
</noscript>
Replace YOUR_TAG_ID with your own unique tag ID. To find your unique tag ID, go to
Copy the 13 digit number below Unique Tag ID and paste it in place of “YOUR_TAG_ID” in the code.
Click Save in the top-left of your Squarespace Code Injection page.
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 Squarespace admin, navigate to Settings.
Click Advanced and then click Code Injection.
Scroll down to the Order Confirmation Page box and paste the following code in the box. If there's already code in this box, paste your event code after it:
<script>
pintrk('track', 'checkout',{
value: {orderGrandTotal},
order_quantity:1
});
</script>
<noscript>
<img height="1" width="1" style="display:none;" alt=""
src="https://ct.pinterest.com/v3/?tid=YourTagID&event=checkout&noscript=1"/>
</noscript>
Replace YourTagID with your own unique tag ID. To find your unique tag ID, go to
Click Save in the top-left of your Squarespace Code Injection page.