Add the Pinterest tag to Google Tag Manager to find out how much Pinterest influences traffic to your store and sales of your products.
The base code has to be installed across all pages of your website and gathers data about different events, like when someone buys a product, or adds a product to their shopping cart.
- To use enhanced match, click the tag to open the Tag Configuration. Click the plus icon below Hashed Email and
choose your website's data layer variable for the email or create a new one.
Event codes let you measure the impact your Pinterest ads have on certain onsite actions. They’re also necessary if you want to
Before you install 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.
Keep in mind that you’ll have to follow the steps below each time you add an event.
- You can also choose a variable to reuse by clicking the plus icon next to Tag ID.
- 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 does not 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.
You can enter multiple product IDs at once to track traffic on all of your products.


In order for this to work, you'll also need to create a
<script>
dataLayer = [{
items : [
{
product_id: '1414',
product_category: 'Shoes'
},
{
product_id: 'ABC',
product_category: 'Toys'
}
]
}];
</script>
Once you've added the data layer, deploy or save your website's code.
You can also include event ID information for deduplication purposes.
- Note: The Value should be dynamically generated for each event in order to be unique to the event
You can also
If you’re using a