Google Tag Manager and Pinterest tag

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

You can connect your Google Tag Manager account with your Pinterest tag to find out how much Pinterest influences traffic to your store and sales of your products.

Install the base code

Install the base code on every page of your site. You can choose whether to install the base code on Pinterest or Google Tag Manager.

Install event codes

Add event codes to your website. Before you install implement your first event code, you have to install the base code. The base code should always be set up to fire before the event code.

You have to install event codes in Google Tag Manager.

  1. Click the name of your tag below Workspace Changes to open it.
  2. Click Tag Configuration.
  3. Click the dropdown menu below Event to Fire and select the event you’d like to track on your website. Depending on what you choose, optional inputs will appear. You can enter a value or click the brick icon and choose the data layer variable for the relevant event data.
    • For addtocart, checkout, and pagevisit event tags, you can add a dynamic variable for product_id event data for audience creation and retargeting. 
      • The product_id dynamic variable doesn't need any extra syntax, it just needs to populate the ID that matches your inventory.
      • If you expect or want to send multiple product_ids at the same time, you’ll need to set up a data layer variable to use our line_items syntax; see below for the structure and an example of a line_items array.
  4. If you’d like, choose custom parameters for audience targeting. 
  5. Click Advanced Settings, then select Tag Sequencing.
    • Check the box next to Fire a tag before <your tag> fires.
    • Click Select Tag and choose the base tag you set up previously.
  6. Click Triggering and select the specific action or page where you'd like your event to fire.
  7. Click Save.

Verify your tag

To verify your tag and view reporting, test your Pinterest tag events, download the Pinterest Tag helper or view your event history. Learn more about the tag manager at Google.

Send in multiple product IDs

  1. After selecting an event from the Event to Fire drop-down menu, click Custom Parameters. Leave Product ID and Product Category under Line Items blank when you’re adding custom parameters. ​Custom Parameters box checked in Tag Configuration in Google Tag Manager
  2. Click Add Row to add a variable.
  3. Enter a name for your variable below Name, then click + below Value.
  4. Select an existing variable from the list or click + in the top-right corner to create a new variable.Google Tag Manager interface showing custom parameters saved
  5. Click Triggering to set any triggers needed for your site, and then click Save.

In order for this to work, you'll also need to create a data layer variable called "items" on any page you want to set the product IDs and product categories. You can set all of them here:

  dataLayer = [{ 
    items : [
        product_id: '1414',
        product_category: 'Shoes'
        product_id: 'ABC',
        product_category: 'Toys'

Once you've added the data layer, deploy or save your website's code.

Content security policies

If you’re using a content security policy with your Google Tag Manager tag container, add these domains as exceptions to any rule preventing code from accessing scripts:

Still need help?
Contact us