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. 

     <!-- Pinterest Pixel Base Code -->
     <script type="text/javascript">
       pintrk('load', 'YOUR_TAG_ID');
       <img height="1" width="1" style="display:none;" alt="" src="" />
     <!-- End Pinterest Pixel Base Code -->
    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.

     pintrk('load', '<tag_id>', {
       'fp_cookie': false,
       'em': '<email address>',
    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?


    How can we make this article better?