Pinterest Tips & Strategies

How to Add a Pinterest HTML Tag to Shopify

By Spencer Lanoue
November 12, 2025

Looking to connect your Shopify store's sales directly to your Pinterest strategy? You're in the right place. Installing the Pinterest HTML tag is the missing link that allows you to track conversions, retarget visitors, and truly measure the return on your marketing efforts. This guide breaks down exactly how to add the Pinterest tag to Shopify, walking you through both the simple app-based method and the manual code-editing process.

Why You Need the Pinterest Tag on Your Shopify Store

Before jumping into the "how," it's helpful to understand the "why." The Pinterest tag isn't just another piece of code, it's a powerful tool that unlocks critical e-commerce data. Think of it as a bridge between the inspiration that happens on Pinterest and the purchases that happen on your Shopify site. For a similar approach with another platform, learn how to add a Facebook pixel to Shopify.

Adding the tag allows you to:

  • Track Conversions: See exactly which Pins and ads are driving sales, add to carts, and sign-ups. Without the tag, you're guessing at what works. With it, you get hard data on your return on ad spend (ROAS).
  • Create Retargeting Audiences: Ever seen an ad for a product you just viewed? That's retargeting. The Pinterest tag lets you build powerful audiences to re-engage shoppers who have visited your site, added items to their cart, or started checkout but didn't buy.
  • Understand Your Customer's Journey: The tag tracks multiple events, like when someone views a product page, searches your site, or completes a purchase. This data gives you a clearer picture of how users interact with your store after clicking through from Pinterest. Learning how to add products to Pinterest can further enhance this journey.
  • Optimize Your Ad Campaigns: Pinterest's algorithm uses the data from your tag to find more people likely to take the actions you care about. When you feed it conversion data, it gets smarter about who it shows your ads to, lowering your cost per acquisition. Discover more about how to advertise on Pinterest to maximize your campaign's potential.

In short, if you're serious about using Pinterest to grow your Shopify store, installing the Pinterest tag is a non-negotiable step.

What You'll Need Before You Start

To make this process as smooth as possible, make sure you have these three things ready to go:

  • A live Shopify store.
  • A Pinterest Business account (you can't install a tag with a personal account). If you don't have one, learn how to create a Pinterest business account.
  • Admin access to both your Shopify and Pinterest accounts.

Method 1: The Simple, Recommended Way (Using the Official Pinterest App)

For 99% of Shopify store owners, this is the best method. It's fast, doesn’t require you to touch any code, and automatically handles the installation of the base tag and important conversion events. Shopify and Pinterest built this integration to make the process foolproof.

Step 1: Install the Pinterest App in Shopify

  1. Log into your Shopify Admin dashboard.
  2. In the left-hand navigation menu, click on "Apps".
  3. Click the "App and sales channel settings" button, then click "Shopify App Store" in the top right.
  4. In the App Store, search for "Pinterest". You're looking for the official app made by Shopify.
  5. Click on the Pinterest app and then click "Add app".
  6. On the authorization screen, review the permissions and click "Add sales channel".

Step 2: Connect Your Pinterest Account

Once the app is installed, you'll be prompted to connect your Pinterest Business account.

  1. Click "Connect account".
  2. A login window for Pinterest will appear. Log in to the Pinterest Business account you want to connect.
  3. Grant the app permissions to access your account by clicking "Give access".

The app will now connect Pinterest directly to Shopify. This process does a few things automatically:

  • It claims your website on Pinterest, which adds your profile picture to any Pins created from your site and gives you access to analytics. For more details, see how to verify your website on Pinterest.
  • It automatically adds the Pinterest tag to your store with all the necessary event tracking, including Page Visits, Add to Carts, and successful Checkouts.

Step 3: Review Your Settings

After connecting, the app will land you on a Settings page. Scroll down to the "Conversion tracking" section. It should confirm that the tag is active and list the ID. That's it! The app handles the rest.

Using the app is the most reliable way to make sure checkout conversion events are tracked correctly, as Shopify has restricted third-party scripts on its checkout pages for security reasons.

Method 2: The Manual Way (Adding Code to Your Theme)

If you prefer more hands-on control or are unable to use the Pinterest Sales Channel app for some reason, you can add the tag manually by editing your theme's code. Important: Always make a backup of your theme before making any code changes. You can do this by going to Online Store >, Themes, clicking the three dots next to your theme, and selecting "Duplicate."

Step 1: Get Your Pinterest Tag ID and Base Code

  1. Log into your Pinterest Business account.
  2. In the top-left menu, go to Ads >, Conversions.
  3. On the Conversions page, you should see your Pinterest Tag on the right side under "Pinterest Tags." If you haven't created one, you'll be prompted to.
  4. Your unique Tag ID is the long string of numbers listed there. Copy this ID, you might need it.
  5. Click on your tag name to open its details, then click "Installation."
  6. Choose the option to "Install the tag yourself." Pinterest will provide a snippet of code. This is your "base code." Copy it to your clipboard.

The code will look something like this, with your specific Tag ID filled in:

<,!-- Pinterest Tag -->,
<,script>,
!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', {em: '<,user_email_address>,'}),
pintrk('page'),
<,/script>,
<,noscript>,
<,img height="1" width="1" style="display:none," alt=""
src="https://ct.pinterest.com/v3/?event=init&,tid=YOUR_TAG_ID&,pd[em]=<,hashed_email_address>,&,noscript=1" />,
<,/noscript>,
<,!-- end Pinterest Tag -->,

Step 2: Add the Base Code to Your Shopify Theme

  1. In your Shopify Admin, go to Online Store >, Themes.
  2. Find your current live theme, click the three-dots icon (...), and select "Edit code."
  3. In the file browser on the left, find and click on the `theme.liquid` file which is located under the "Layout" folder. This file contains the foundational HTML for every page of your site.
  4. Scroll down until you find the closing `<,/head>,` tag.
  5. Paste the entire Pinterest base code snippet you copied right before this `<,/head>,` tag.
  6. Click "Save."

This installs the base code, which will fire a "PageVisit" event on every page of your website. However, for e-commerce, you need to track more specific actions.

Note on Event Tracking: Manually adding specific event codes (like `AddToCart` or `Checkout`) is much more complex and can break easily with theme updates. Events like `Checkout` often cannot be tracked accurately this way due to Shopify checkout page restrictions. For this reason, even if you install the base code manually, using the Pinterest Sales Channel app is still the best and most reliable practice for full event tracking.

How to Check If Your Pinterest Tag is Working

Don't just install it and hope for the best. You need to verify that it's actually firing correctly.

Use the Pinterest Tag Helper Chrome Extension

  1. Go to the Google Chrome Web Store and search for "Pinterest Tag Helper."
  2. Install the extension. Once installed, a small red Pinterest "P" icon will appear in your browser's toolbar.
  3. Navigate to your Shopify store in a new tab.
  4. Click the Pinterest Tag Helper icon. A small window will pop up.

Here's what to look for:

  • A green checkmark: This means the extension found a Pinterest tag on your site. Hooray!
  • How many events were fired: On your homepage, it should find at least one event: "Initialized" or "PageVisit."
  • Click different products: Go to a product page. The extension should now show a "PageVisit" event and potentially a "ViewContent" event.
  • Add a product to your cart: After adding a product, check the extension again. You should see a new "AddToCart" event.

If you see these events firing, your tag is working properly. It can still take up to 24 hours for the data to start showing up in your Pinterest Ads Manager, so be patient.

Final Thoughts

Installing your Pinterest HTML tag on Shopify is an essential step to level up your social commerce game. Whether you choose the super simple official app method or the manual code edit, the goal is the same: to get the data you need to make smarter marketing decisions, optimize your ads, and ultimately grow your sales.

Once you have tracking in place with your Pinterest tag, the next step is building a consistent content strategy that drives that qualified traffic. At Postbase, we built a modern tool specifically to take the headache out of a multi-platform content calendar. We designed it for short-form video, seamless cross-platform scheduling, and the formats that matter today, helping you plan and publish engaging content without pulling your hair out or wrestling with clunky, outdated software.

Spencer's spent a decade building products at companies like Buffer, UserTesting, and Bump Health. He's spent years in the weeds of social media management—scheduling posts, analyzing performance, coordinating teams. At Postbase, he's building tools to automate the busywork so you can focus on creating great content.

Other posts you might like

How to Add Social Media Icons to an Email Signature

Enhance your email signature by adding social media icons. Discover step-by-step instructions to turn every email into a powerful marketing tool.

Read more

How to Record Audio for Instagram Reels

Record clear audio for Instagram Reels with this guide. Learn actionable steps to create professional-sounding audio, using just your phone or upgraded gear.

Read more

How to Check Instagram Profile Interactions

Check your Instagram profile interactions to see what your audience loves. Discover where to find these insights and use them to make smarter content decisions.

Read more

How to Request a Username on Instagram

Requesting an Instagram username? Learn strategies from trademark claims to negotiation for securing your ideal handle. Get the steps to boost your brand today!

Read more

How to Attract a Target Audience on Instagram

Attract your ideal audience on Instagram with our guide. Discover steps to define, find, and engage followers who buy and believe in your brand.

Read more

How to Turn On Instagram Insights

Activate Instagram Insights to boost your content strategy. Learn how to turn it on, what to analyze, and use data to grow your account effectively.

Read more

Stop wrestling with outdated social media tools

Wrestling with social media? It doesn’t have to be this hard. Plan your content, schedule posts, respond to comments, and analyze performance — all in one simple, easy-to-use tool.

Schedule your first post
The simplest way to manage your social media
Rating