Pinterest Tag
The Pinterest Tag tracks user actions on your website and reports them back to Pinterest Ads. It enables conversion optimization, audience building, and attribution for Pinterest advertising campaigns. The standard events — Checkout, AddToCart, PageVisit, Search, ViewCategory — map to natural shopping and browsing moments that align with how Pinterest users discover and purchase products.
Prerequisites
Section titled “Prerequisites”- Pinterest Tag ID from your Pinterest Ads account (a numeric ID like
2612345678901) - Access to Pinterest Ads Manager to verify events in the Conversions section
Installation via Community Template
Section titled “Installation via Community Template”Use the Pinterest Tag community template rather than Custom HTML — Pinterest maintains an official template in the GTM Community Template Gallery that handles the base code initialization correctly.
-
In GTM, create a new Tag → Discover more tag types → Community Template Gallery
-
Search for “Pinterest Tag” — select the template published by Pinterest
-
Add to workspace
-
Create your base tag: Pinterest Tag — PageVisit
- Tag Type: Pinterest Tag
- Tag ID: your Pinterest Tag ID
- Event: PageVisit
- Trigger: All Pages
- Save
-
Publish the base tag before adding additional events
Standard events
Section titled “Standard events”Checkout (Purchase)
Section titled “Checkout (Purchase)”The most important event for conversion optimization.
Event: CheckoutParameters: value: {{DL - Revenue}} (required — number) currency: {{DL - Currency}} (required — ISO 4217 code, e.g., "USD") order_id: {{DL - Transaction ID}} (required for deduplication) line_items: [ (array of products) { product_name: {{DL - Item Name}}, product_id: {{DL - Item ID}}, product_price: {{DL - Item Price}}, product_quantity: {{DL - Item Quantity}} } ] event_id: {{DL - Event ID}} (required if using Conversions API)Trigger: Custom Event — purchase
AddToCart
Section titled “AddToCart”Event: AddToCartParameters: value: {{DL - Price}} currency: {{DL - Currency}} line_items: [ { product_name: {{DL - Product Name}}, product_id: {{DL - Product ID}}, product_price: {{DL - Price}}, product_quantity: {{DL - Quantity}} } ] event_id: {{DL - Event ID}}Trigger: Custom Event — add_to_cart
ViewCategory
Section titled “ViewCategory”Fire on category or collection pages.
Event: ViewCategoryParameters: value: {{DL - Category}} line_items: [{ product_category: {{DL - Category Name}} }]Trigger: Custom Event — view_item_list
PageVisit
Section titled “PageVisit”This fires automatically with your base tag on All Pages. No additional configuration needed for standard page tracking. If you want to pass additional data on specific page types (e.g., product pages), you can create additional PageVisit tags with parameters:
Event: PageVisitParameters: property: {{Page Type}} line_items: [{ product_name: {{DL - Product Name}} }]Search
Section titled “Search”Event: SearchParameters: search_query: {{DL - Search Term}}Trigger: Custom Event — search
Event: LeadParameters: lead_type: {{Form Type}} value: {{Lead Value}} currency: {{DL - Currency}} event_id: {{DL - Event ID}}Trigger: Custom Event — generate_lead
Signup
Section titled “Signup”Event: SignupParameters: lead_type: "Account Registration" event_id: {{DL - Event ID}}Trigger: Custom Event — sign_up
Enhanced Match
Section titled “Enhanced Match”Enhanced Match sends hashed customer information with events to improve match rates and attribution accuracy. Pinterest matches the hashed data against their user profiles.
Supported fields:
- Email address (SHA-256 hashed)
- Phone number (SHA-256 hashed, E.164 format:
+15551234567)
Configuration:
In the Pinterest Tag template, there is an Enhanced Match section. Map your hashed variables:
// Custom JavaScript Variable: Pinterest - Hashed Email// (Assumes hashed email is pushed to dataLayer by your backend)function() { return {{DL - User Hashed Email}} || undefined;}As with Meta, hash server-side and push the hash to the dataLayer — do not hash in the browser.
Pinterest Conversions API (CAPI)
Section titled “Pinterest Conversions API (CAPI)”Pinterest’s Conversions API is the server-side companion to the client-side tag. Configure it in sGTM using the Pinterest Conversions API community template for sGTM.
Setup:
- In your sGTM container, add the Pinterest Conversions API template from the gallery
- Configure:
- Ad Account ID: from Pinterest Ads Manager
- Conversion Token: generate in Pinterest Ads Manager → Conversions → CAPI → Create new access token
- Event Name: Map from GA4 event name
- Event ID: Map from event parameter (same ID as client-side)
Deduplication:
Pinterest deduplicates using event_id. The same event_id passed in both the client-side tag and CAPI results in Pinterest counting the event only once.
Generate and push event_id to the dataLayer before the purchase event:
dataLayer.push({ ecommerce: null });dataLayer.push({ event: 'purchase', event_id: 'ev-' + Date.now() + '-' + Math.random().toString(36).substr(2, 9), ecommerce: { transaction_id: 'ORDER-123', currency: 'USD', value: 59.99, items: [...] }});User data for CAPI:
Pinterest CAPI accepts the same set of hashed user data as the Enhanced Match feature. Pass hashed email and phone when available. Also pass the _pinterest_ct cookie (Pinterest’s click tracking cookie) if present.
Verifying your implementation
Section titled “Verifying your implementation”- Go to Pinterest Ads Manager → Ads → Conversions
- Select your Tag ID
- Check “Recent activity” to see events that fired in the last 24 hours
- Verify event names, parameter values, and match quality
Pinterest also has a Tag Health feature that shows active and inactive events and flags configuration issues.
Common mistakes
Section titled “Common mistakes”Firing PageVisit without parameters on product pages
Section titled “Firing PageVisit without parameters on product pages”On product pages, your PageVisit event should include product details in line_items. This improves Pinterest’s Dynamic Product Ads targeting. A blank PageVisit on product pages misses the product attribution opportunity.
Not including order_id in the Checkout event
Section titled “Not including order_id in the Checkout event”Pinterest uses order_id to detect and deduplicate checkout events. Without it, users who refresh the thank-you page generate duplicate conversions. Always include order_id on the Checkout event.
Using the wrong currency format
Section titled “Using the wrong currency format”Pinterest expects ISO 4217 currency codes: USD, EUR, GBP, etc. Do not pass currency symbols ($, €) or informal abbreviations.
Passing revenue as a formatted string
Section titled “Passing revenue as a formatted string”// ❌ String with formattingvalue: "$59.99"
// ❌ String without symbolvalue: "59.99"
// ✅ Numbervalue: 59.99