Squarespace and Pinterest Tag

Step 1: Base code

  1. From your Squarespace admin, navigate to Settings​

  2. Click Advanced and then click Code Injection

  3. Paste the following code ​in the box titled “Header”​; ​if there 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

  5. To find this, navigate to Ads Manager and click on Ads​, then find Conversion Tracking​ and click Generate Pinterest Tag

  6. Navigate to your conversion tracking overview and find the details section

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

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

Step 2: Checkout code

  1. Follow steps 1 and 2 from above to navigate to the ‘Code injection’ page, and scroll down to the box titled “Order Confirmation Page​”

  2. Paste the following code in the box; if there is already code in this box, paste your tracking 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>

     

  3. Replace “YourTagID”​ with the unique tag ID that was generated in Ads Manager

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

Still need help?
Contact us