Pinterest Ads Setup & Implementation | OpsBlu Docs

Pinterest Ads Setup & Implementation

How to implement Pinterest Ads with Pinterest Tag and Conversions API. Covers tag installation, Enhanced Match, conversion event setup, product catalog.

Pinterest Ads tracking runs on two parallel systems: the Pinterest Tag (client-side JavaScript) and the Conversions API (server-side HTTP). Pinterest's user base skews heavily toward purchase-intent behavior -- users browse Pinterest to plan purchases, not just consume content. This means conversion tracking accuracy has an outsized impact on campaign ROI because the platform's audience is already closer to buying. A misconfigured tag that misses conversions directly undermines Pinterest's ability to find more users who look like your actual buyers.

Why Proper Implementation Matters

Pinterest's High-Intent Audience

Unlike social platforms where ads interrupt content consumption, Pinterest users actively search for products, ideas, and inspiration. This creates a unique measurement dynamic:

  • Longer attribution paths: Users save Pins weeks before purchasing, requiring longer attribution windows
  • Cross-device journeys: Users browse on mobile but purchase on desktop at higher rates than other platforms
  • Catalog-driven shopping: Product Pins with accurate tracking enable dynamic retargeting with actual product imagery
  • Visual search: Pinterest Lens drives product discovery, but only attributes correctly with proper tag implementation

What Breaks Without Accurate Tracking

  • Shopping campaigns cannot optimize product-level bids without purchase conversion data
  • Catalog sales objectives require the Checkout event with matching product IDs from your catalog
  • Audience Actalikes (Pinterest's version of lookalikes) are seeded from conversion data -- bad data means bad audiences
  • CPA bidding has no signal to optimize against, defaulting to impression delivery
  • ROAS reporting shows zero or incomplete revenue, making Pinterest look ineffective relative to other channels

The Conversions API Advantage

Pinterest's Conversions API (released 2022) provides the same benefits as Meta's CAPI:

  • Server-side events are not blocked by ad blockers or browser privacy features
  • Enhanced Match data improves user matching for attributed conversions
  • Deduplication ensures events are not double-counted across tag and API
  • Server events arrive more reliably than browser events (no page abandonment data loss)

Pre-Implementation Planning

Access and Permissions

Pinterest Business Hub:

  1. Log in at ads.pinterest.com
  2. Ensure your account is a Business account (convert from personal if needed)
  3. Request Ad Account access with "Admin" or "Campaign Manager" role
  4. For agencies: Accept invitation from the client's Business Hub

Required Access:

Platform Role Purpose
Pinterest Business Hub Admin Tag management, domain claim, API tokens
Pinterest Ads Manager Campaign Manager+ Campaign creation, conversion setup
Google Tag Manager Publish Deploy Pinterest Tag
Server Environment Deploy Conversions API endpoint
Product Catalog System Read Feed URL for shopping campaigns

Key Identifiers:

  • Tag ID: Found in Ads Manager > Conversions > Pinterest Tag (format: 15-digit number)
  • Ad Account ID: In Ads Manager > Account Settings
  • API Access Token: Generated in Business Hub > Conversions API settings
  • Conversion Token: Generated alongside API access for server-side events

Domain Verification

Domain claiming is required for full tag functionality and attribution:

  1. In Pinterest Business Hub, navigate to Claimed Accounts

  2. Add your domain

  3. Verify via one of three methods:

    • HTML file: Upload pinterest-xxxxx.html to your root directory
    • Meta tag: Add <meta name="p:domain_verify" content="xxxxx"/> to your homepage <head>
    • DNS TXT record: Add pinterest-site-verification=xxxxx to your domain DNS
  4. After verification, your domain's content will show your profile icon on Pins linking to your site

Conversion Event Planning

Pinterest supports these standard events:

Event When to Fire Key Parameters
pagevisit Every page load None required
viewcategory Category/collection pages line_items with category
search Search results page search_query
addtocart Add to cart action line_items with product details, value, currency
checkout Purchase completion line_items, value, currency, order_id
signup Account registration None required
lead Form submission lead_type
watchvideo Video view milestone video_title
custom Any custom event Custom parameters

Attribution Windows (configure in Ads Manager > Conversions):

  • Click attribution: 1, 7, 14, or 30 days (default: 30 days)
  • View attribution: 1 or 7 days (default: 1 day)
  • Engagement attribution: 1, 7, 14, or 30 days (default: 30 days)

Implementation Walkthrough

Step 1: Deploy Pinterest Tag Base Code

The base tag goes on every page and automatically tracks pagevisit events.

Direct Installation:

<!-- 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: '<HASHED_EMAIL>'   // Enhanced Match: SHA-256 hashed email
  });
  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&noscript=1" />
</noscript>
<!-- End Pinterest Tag -->

Via Google Tag Manager:

  1. Create a new tag: Tag Type > Custom HTML
  2. Paste the Pinterest Tag code
  3. Replace YOUR_TAG_ID with your actual Tag ID
  4. Set trigger: All Pages
  5. Add consent conditions if using a CMP

Alternatively, use the Pinterest Tag template from the GTM Community Template Gallery:

  1. In GTM, go to Tags > New > Tag Configuration > Search Gallery
  2. Search for "Pinterest Tag"
  3. Install the template
  4. Configure with your Tag ID

Step 2: Implement Conversion Events

Add to Cart:

pintrk('track', 'addtocart', {
  value: 49.99,
  order_quantity: 1,
  currency: 'USD',
  line_items: [{
    product_name: 'Premium Widget',
    product_id: 'SKU-12345',
    product_category: 'Widgets',
    product_price: 49.99,
    product_quantity: 1,
    product_brand: 'Acme'
  }]
});

Checkout (Purchase):

pintrk('track', 'checkout', {
  value: 129.98,
  order_quantity: 2,
  currency: 'USD',
  order_id: 'ORD-2024-12345',
  line_items: [
    {
      product_name: 'Premium Widget',
      product_id: 'SKU-12345',       // Must match catalog product_id
      product_category: 'Widgets',
      product_price: 49.99,
      product_quantity: 1,
      product_brand: 'Acme'
    },
    {
      product_name: 'Deluxe Gadget',
      product_id: 'SKU-67890',
      product_category: 'Gadgets',
      product_price: 79.99,
      product_quantity: 1,
      product_brand: 'Acme'
    }
  ]
});

Lead Form Submission:

pintrk('track', 'lead', {
  lead_type: 'Contact Form',
  value: 50.00,
  currency: 'USD'
});

Signup:

pintrk('track', 'signup', {
  value: 0,
  currency: 'USD'
});

Step 3: Enable Enhanced Match

Enhanced Match sends hashed user data with every tag event, improving conversion attribution rates.

At Tag Initialization (recommended):

// Hash email before passing to tag
function sha256Hash(value) {
  // Use Web Crypto API for client-side hashing
  const encoder = new TextEncoder();
  const data = encoder.encode(value.toLowerCase().trim());
  return crypto.subtle.digest('SHA-256', data).then(buffer => {
    return Array.from(new Uint8Array(buffer))
      .map(b => b.toString(16).padStart(2, '0'))
      .join('');
  });
}

// Initialize with Enhanced Match
const hashedEmail = await sha256Hash('customer@example.com');
pintrk('load', 'YOUR_TAG_ID', {
  em: hashedEmail
});

Automatic Enhanced Match (simpler):

In Pinterest Ads Manager:

  1. Navigate to Conversions > Pinterest Tag > Tag Settings
  2. Enable Automatic Enhanced Match
  3. Pinterest Tag will automatically detect and hash email fields on your pages
  4. This works best on pages with visible email input fields (checkout, registration)

Step 4: Implement Conversions API

Server-side event tracking provides reliable conversion data regardless of browser restrictions.

const crypto = require('crypto');

const PINTEREST_API_URL = 'https://api.pinterest.com/v5/ad_accounts';
const AD_ACCOUNT_ID = 'YOUR_AD_ACCOUNT_ID';
const ACCESS_TOKEN = 'YOUR_ACCESS_TOKEN';

function sha256(value) {
  if (!value) return null;
  return crypto.createHash('sha256')
    .update(value.toLowerCase().trim())
    .digest('hex');
}

async function sendPinterestConversion(eventData) {
  const payload = {
    data: [{
      event_name: eventData.event_name,
      action_source: 'web',
      event_time: Math.floor(Date.now() / 1000),
      event_id: eventData.event_id,  // Must match client-side event ID for dedup
      event_source_url: eventData.page_url,
      user_data: {
        em: [sha256(eventData.email)],
        ph: [sha256(eventData.phone)],
        fn: [sha256(eventData.first_name)],
        ln: [sha256(eventData.last_name)],
        ct: [sha256(eventData.city)],
        st: [sha256(eventData.state)],
        zp: [eventData.zip],
        country: [sha256(eventData.country)],
        client_ip_address: eventData.ip,
        client_user_agent: eventData.user_agent,
        external_id: [sha256(eventData.user_id)]
      },
      custom_data: {
        currency: eventData.currency || 'USD',
        value: String(eventData.value),
        order_id: eventData.order_id,
        num_items: eventData.item_count,
        content_ids: eventData.product_ids
      }
    }]
  };

  const response = await fetch(
    `${PINTEREST_API_URL}/${AD_ACCOUNT_ID}/events`,
    {
      method: 'POST',
      headers: {
        'Authorization': `Bearer ${ACCESS_TOKEN}`,
        'Content-Type': 'application/json'
      },
      body: JSON.stringify(payload)
    }
  );

  return response.json();
}

// Example: Send purchase from order confirmation handler
await sendPinterestConversion({
  event_name: 'checkout',
  event_id: 'checkout_ORD-2024-12345_' + Date.now(),
  page_url: 'https://yoursite.com/order-confirmation',
  email: 'customer@example.com',
  phone: '+15551234567',
  first_name: 'John',
  last_name: 'Doe',
  ip: req.ip,
  user_agent: req.headers['user-agent'],
  value: 129.98,
  currency: 'USD',
  order_id: 'ORD-2024-12345',
  product_ids: ['SKU-12345', 'SKU-67890'],
  item_count: 2,
  user_id: 'USER-12345'
});

Step 5: Event Deduplication

Send matching event_id values from both client-side tag and server-side API:

// Client-side: Generate unique event ID
const eventId = 'checkout_' + orderId + '_' + Date.now();

// Send via Pinterest Tag
pintrk('track', 'checkout', {
  value: 129.98,
  currency: 'USD',
  order_id: 'ORD-2024-12345',
  event_id: eventId  // Deduplication key
});

// Send same event_id to your server for CAPI
fetch('/api/pinterest-conversion', {
  method: 'POST',
  body: JSON.stringify({
    event_name: 'checkout',
    event_id: eventId,  // SAME ID for deduplication
    value: 129.98,
    order_id: 'ORD-2024-12345'
  })
});

Step 6: Configure Product Catalog

For shopping campaigns, connect your product catalog:

  1. In Pinterest Business Hub, navigate to Catalogs
  2. Click Add a Data Source
  3. Provide your product feed URL (supported formats: CSV, TSV, XML)
  4. Required feed fields:
Field Description Example
id Unique product identifier (must match product_id in tag events) SKU-12345
title Product name Premium Widget
description Product description High-quality widget for...
link Product page URL https://yoursite.com/products/widget
image_link Product image URL https://yoursite.com/images/widget.jpg
price Price with currency 49.99 USD
availability In stock / out of stock in stock
  1. Set feed update schedule (daily recommended)
  2. After feed ingestion, product Pins automatically generate from your catalog

Critical: The id field in your catalog must exactly match the product_id values in your Pinterest Tag events. Mismatched IDs break shopping campaign optimization.

Verification and QA

Pinterest Tag Helper

Install the Pinterest Tag Helper Chrome extension:

  1. Navigate through your conversion funnel
  2. Click the Tag Helper icon on each page
  3. Verify:
    • Tag ID is correct
    • page event fires on every page
    • Conversion events fire with correct names and parameters
    • Enhanced Match data is present
    • No errors or warnings

Ads Manager Event History

  1. In Pinterest Ads Manager, navigate to Conversions > Event History
  2. Filter by event type and date range
  3. Verify:
    • Events appear within minutes of firing
    • Event counts match your test actions
    • Parameter values (value, currency, order_id) are correct
    • Enhanced Match coverage percentage

Conversions API Diagnostics

  1. In Ads Manager, go to Conversions > API Events
  2. Check:
    • API event delivery status (success/failure)
    • Deduplication rate (should be 5-20%)
    • Error codes and messages for failed events
    • Data freshness (events should arrive within seconds)

Common Issues

Issue Cause Fix
Tag not firing Script blocked or consent not granted Check ad blocker, verify consent flow
Events missing parameters Data layer variables not populated Debug GTM variables, check data layer pushes
Shopping campaigns not optimizing Product IDs in tag don't match catalog Ensure product_id matches catalog id field exactly
Low attribution rate Missing Enhanced Match data Enable automatic Enhanced Match, add email hashing
Duplicate conversions Missing event_id for dedup Add matching event IDs to both tag and API
Catalog ingestion errors Feed format issues Validate feed against Pinterest's schema requirements

Deployment Artifacts

  • Tag ID and API credentials: Tag ID, access token, and conversion token (store securely)
  • Tracking plan: All events with parameters, dedup IDs, and client/server sources
  • GTM container documentation: Tags, triggers, variables, and version history
  • CAPI endpoint documentation: Server URL, authentication, and payload format
  • Enhanced Match configuration: Fields collected, hashing method, automatic vs. manual setup
  • Product catalog feed: Feed URL, update schedule, field mapping, and ID matching rules
  • Attribution windows: Click, view, and engagement window settings with rationale
  • Domain verification: Verification method and status
  • Environment matrix: Tag ID, API credentials, and endpoints per environment

Linked Runbooks

Change Log and Owners

  • Maintain a changelog with date, deployer, tag updates, and event changes
  • Record attribution window changes with effective dates
  • Document domain claim status and Business Hub permissions
  • Track catalog feed updates and product ID mapping changes
  • Review monthly: Enhanced Match coverage, dedup rates, API delivery success rates