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

The base code is the foundation of the Pinterest tag. You have to add the base code to every page of your website so that event codes can function and audience data can be built from the traffic on your website. Always add the base code to the HTML code of all pages of your website before adding an event code.

Add the base code to your website
  • Log into your Pinterest business account
  • Click Ads at the top of your screen, then click Conversions
  • Choose how you want to install the Pinterest tag:
    • Click Get started next to Use an integration partner to select which integration partner you want to use and follow the steps provided
    • Click Add code next to Add code to website to install the tag yourself
    • Click Email address next to Email instructions to send instructions to your technical support so they can install the tag for you
  • After you click Add code, scroll down in the box that appears and click Copy code
  • Paste the base code you copied in the global header of your website’s HTML, between the <head> and </head> tags so that it’s present on every page
  • Note: Where you place the base code might be different depending on your website.

    We do not recommend that you copy and paste this sample base code below. You should always get your personalized base code from your profile in the Conversions page of Ads Manager. The base code will have your unique Pinterest tag ID in place of YOUR_TAG_ID in the code below. 

    <head>
     <!-- Pinterest Pixel Base Code -->
     <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');
       pintrk('page');
     </script>
     <noscript>
       <img height="1" width="1" style="display:none;" alt="" src="https://ct.pinterest.com/v3/?tid=YOUR_TAG_ID&event=init&noscript=1" />
     </noscript>
     <!-- End Pinterest Pixel Base Code -->
    </head>
    Delete first-party cookies

    The Pinterest tag creates and accesses cookies in a first-party context on your site domain, providing better visibility into the Pinterest traffic on your site.

    You can delete first-party cookies by setting the fp_cookie parameter in your base code to false, like in the example below. Learn more about cookies and the Pinterest tag.

    <script>
     pintrk('load', '<tag_id>', {
       'fp_cookie': false,
       'em': '<email address>',
     });
    </script>
    What's the next step?

    Add event codes so you can track specific events when they happen on your website. 

    End of Other articles Links
    Still need help? Contact us
    User feedback
    Was this article helpful?

    collection_fields

    How can we make this article better?