Add the Pinterest tag to Squarespace

It looks like you're viewing this from a region that Pinterest Tag isn't available in yet. See where Pinterest Tag is available to Pinterest Business accounts.

Learn more

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.

Add the base code

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

  1. From your Squarespace admin, navigate to Settings.

  2. Click Advanced and then click Code Injection.

  3. 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>
    

     

  4. Replace YOUR_TAG_ID with your own unique tag ID. To find your unique tag ID, go to Ads Manager and click Ads, then find Conversion Tracking and click Get started under Install Pinterest Tag.

  5. Copy the 13 digit number below Unique Tag ID and paste it in place of “YOUR_TAG_ID” in the code.

  6. Click Save in the top-left of your Squarespace Code Injection page.

Add the checkout event

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.

  1. From your Squarespace admin, navigate to Settings.

  2. Click Advanced and then click Code Injection.

  3. 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>

     

  4. Replace YourTagID with your own unique tag ID. To find your unique tag ID, go to Ads Manager and click Ads, then find Conversion Tracking and click Get started under Install Pinterest Tag.

  5. Click Save in the top-left of your Squarespace Code Injection page.

Still need help?
Contact us