Pinterest Ads Event Tracking
Overview
Pinterest uses the Pinterest Tag (pixel) for conversion tracking, audience building, and campaign optimization. The platform also supports the Pinterest Conversions API for server-side tracking and enhanced measurement. Pinterest's visual discovery focus makes conversion tracking essential for retail, ecommerce, home decor, fashion, and lifestyle brands.
Standard Events
Pinterest provides predefined events optimized for shopping and discovery:
Ecommerce Events
- Checkout - Checkout process initiated
- AddToCart - Product added to shopping cart
- Purchase - Completed transaction (required for catalog campaigns)
- ViewCategory - Product category page viewed
- Search - Site search performed
- WatchVideo - Video content watched
Lead Generation Events
General Events
- PageVisit - Automatically tracked page view
- Custom - Custom business-specific events
Catalog Events
For Pinterest Shopping campaigns, specific events are required:
- PageVisit - Product detail page view
- AddToCart - Product added to cart
- Checkout - Checkout initiated
- Purchase - Order completed
Custom Events
Creating Custom Events
Track business-specific actions with custom events:
// Custom event
pintrk('track', 'custom', {
event_id: 'unique_event_id_123',
custom_event_name: 'ProductComparison',
value: 29.99,
currency: 'USD'
});
Event Parameters
Add detailed parameters to any event:
pintrk('track', 'Lead', {
value: 50.00,
currency: 'USD',
lead_type: 'newsletter',
email_hash: hashEmail('user@example.com') // SHA256 hash
});
Video Engagement
Track video interactions:
// Video start
pintrk('track', 'WatchVideo', {
video_title: 'Product Demo',
property: 'video_start'
});
// Video 25% complete
pintrk('track', 'WatchVideo', {
video_title: 'Product Demo',
property: 'video_25'
});
// Video complete
pintrk('track', 'WatchVideo', {
video_title: 'Product Demo',
property: 'video_complete'
});
Ecommerce Events
Purchase Tracking
Complete purchase implementation with product details:
<!-- Pinterest Tag Base Code (on all pages) -->
<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&noscript=1" />
</noscript>
<!-- Purchase Event (on confirmation page) -->
<script>
pintrk('track', 'checkout', {
value: 149.99,
order_quantity: 3,
currency: 'USD',
line_items: [
{
product_name: 'Blue Widget',
product_id: 'SKU_123',
product_price: 99.99,
product_quantity: 1,
product_category: 'Widgets'
},
{
product_name: 'Red Gadget',
product_id: 'SKU_456',
product_price: 25.00,
product_quantity: 2,
product_category: 'Gadgets'
}
],
order_id: 'ORDER_12345'
});
</script>
Shopping Funnel Events
Track the complete shopping journey:
// Product page view
pintrk('track', 'pagevisit', {
line_items: [{
product_id: 'SKU_123',
product_name: 'Blue Widget',
product_price: 99.99,
product_category: 'Widgets'
}]
});
// Add to Cart
pintrk('track', 'addtocart', {
value: 99.99,
currency: 'USD',
line_items: [{
product_id: 'SKU_123',
product_name: 'Blue Widget',
product_price: 99.99,
product_quantity: 1,
product_category: 'Widgets'
}]
});
// Checkout
pintrk('track', 'checkout', {
value: 149.99,
order_quantity: 3,
currency: 'USD',
line_items: [
{
product_id: 'SKU_123',
product_price: 99.99,
product_quantity: 1
},
{
product_id: 'SKU_456',
product_price: 25.00,
product_quantity: 2
}
],
order_id: 'ORDER_12345'
});
Dynamic Parameters
Required parameters for Pinterest Shopping:
pintrk('track', 'checkout', {
value: 99.99, // Total order value
currency: 'USD', // ISO currency code
order_quantity: 2, // Number of items
order_id: 'ORDER_12345', // Unique order ID
line_items: [{
product_id: 'SKU_123', // Required: matches catalog
product_name: 'Product Name',
product_category: 'Category',
product_variant: 'Blue', // Color, size, etc.
product_variant_id: 'VAR_123',
product_price: 99.99,
product_quantity: 2,
product_brand: 'Brand Name'
}]
});
Conversion Tracking
Implementation Methods
1. Pinterest Tag (Browser-Side)
Standard JavaScript implementation:
<!-- Base Tag (all pages) -->
<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");
// Enhanced matching with hashed email
pintrk('load', 'YOUR_TAG_ID', {
em: '<hashed_email_address>'
});
pintrk('page');
</script>
<!-- Conversion Event -->
<script>
pintrk('track', 'checkout', {
value: 99.99,
currency: 'USD',
order_id: 'ORDER_12345'
});
</script>
2. Google Tag Manager
Deploy Pinterest Tag via GTM:
Base Tag:
// GTM Custom HTML Tag - All Pages
<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', '{{Pinterest Tag ID}}');
pintrk('page');
</script>
// GTM Custom HTML Tag - Conversion Pages
<script>
pintrk('track', 'checkout', {
value: {{Transaction Value}},
currency: 'USD',
order_id: {{Transaction ID}},
order_quantity: {{Item Count}}
});
</script>
3. Pinterest Conversions API
Server-side tracking for enhanced accuracy:
// Node.js example
const axios = require('axios');
const crypto = require('crypto');
function hashData(data) {
return crypto.createHash('sha256').update(data.toLowerCase().trim()).digest('hex');
}
const conversionData = {
event_name: 'checkout',
action_source: 'web',
event_time: Math.floor(Date.now() / 1000),
event_id: 'ORDER_12345_' + Date.now(), // Deduplication ID
event_source_url: 'https://example.com/checkout/success',
user_data: {
em: [hashData('user@example.com')], // Hashed email
ph: [hashData('+15551234567')], // Hashed phone
client_ip_address: '192.168.1.1',
client_user_agent: 'Mozilla/5.0...'
},
custom_data: {
value: 99.99,
currency: 'USD',
order_id: 'ORDER_12345',
order_quantity: 2,
contents: [{
item_id: 'SKU_123',
item_name: 'Blue Widget',
item_price: 99.99,
item_quantity: 2,
item_category: 'Widgets'
}]
}
};
const response = await axios.post(
'https://api.pinterest.com/v5/ad_accounts/YOUR_AD_ACCOUNT_ID/events',
{ data: [conversionData] },
{
headers: {
'Authorization': `Bearer YOUR_ACCESS_TOKEN`,
'Content-Type': 'application/json'
}
}
);
4. E-commerce Platform Integrations
Official integrations for seamless tracking:
- Pinterest app from Shopify App Store
- Automatic tag installation
- Product catalog sync
- Automatic conversion tracking
- Pinterest for WooCommerce plugin
- One-click tag setup
- Catalog feed generation
- Enhanced ecommerce tracking
BigCommerce, Magento, PrestaShop:
- Native Pinterest integrations available
- Automated tag management
- Catalog synchronization
Enhanced Matching
Improve conversion matching with user data:
// Enhanced matching via Pinterest Tag
pintrk('load', 'YOUR_TAG_ID', {
em: hashEmail('user@example.com'), // SHA256 hashed email
ph: hashPhone('+15551234567'), // SHA256 hashed phone
ge: hashGender('f'), // SHA256 hashed gender
db: hashBirthday('19900101'), // SHA256 hashed birthday (YYYYMMDD)
ln: hashLastName('doe'), // SHA256 hashed last name
fn: hashFirstName('jane'), // SHA256 hashed first name
ct: hashCity('san francisco'), // SHA256 hashed city
st: hashState('ca'), // SHA256 hashed state
zp: hashZip('94102'), // SHA256 hashed zip
country: hashCountry('us') // SHA256 hashed country
});
function hashEmail(email) {
// Implementation of SHA256 hash
return CryptoJS.SHA256(email.toLowerCase().trim()).toString();
}
Event Deduplication
Prevent duplicate events when using Tag + API:
// Browser-side with event_id
const eventId = 'ORDER_12345_' + Date.now();
pintrk('track', 'checkout', {
value: 99.99,
currency: 'USD',
order_id: 'ORDER_12345',
event_id: eventId // Unique identifier
});
// Server-side with matching event_id
// Use same eventId value in API call
Offline Conversions
Conversions API for Offline Data
Upload offline conversions via API:
import requests
import hashlib
import time
def hash_data(data):
return hashlib.sha256(data.lower().strip().encode()).hexdigest()
# Prepare conversion data
conversion = {
"event_name": "checkout",
"action_source": "offline",
"event_time": int(time.time()),
"event_id": "OFFLINE_ORDER_12345",
"user_data": {
"em": [hash_data("customer@example.com")],
"ph": [hash_data("+15551234567")]
},
"custom_data": {
"value": 99.99,
"currency": "USD",
"order_id": "OFFLINE_ORDER_12345"
}
}
# Send to Pinterest API
headers = {
"Authorization": f"Bearer {access_token}",
"Content-Type": "application/json"
}
response = requests.post(
f"https://api.pinterest.com/v5/ad_accounts/{ad_account_id}/events",
json={"data": [conversion]},
headers=headers
)
CRM Integration
Connect CRM for automated offline conversion tracking:
Implementation Steps:
- Capture Pinterest click ID (_epik cookie) on website
- Store click ID in CRM with lead/customer record
- Export conversions from CRM with click IDs
- Upload via Conversions API
Supported Action Sources:
offline- In-store or phone salesapp_android- Android app conversionsapp_ios- iOS app conversionsweb- Website conversions
Attribution
Attribution Windows
Configure attribution settings per conversion event:
Default Windows:
- Click-through: 30 days
- View-through: 1 day
- Engagement: 1 day (for engaged views)
Customizable Options:
- Click: 1, 7, 14, 30, 60 days
- View: 1, 7, 14, 30 days
- Engagement: 1, 7, 14, 30 days
Configure in: Ads Manager > Conversions > Edit Conversion Event
Attribution Models
Pinterest uses last-touch attribution:
- Last clicked Pin gets 100% credit
- If no click, last viewed Pin gets credit
- Engagement actions (close-ups, saves) may get credit within engagement window
Cross-Device Attribution
Automatic cross-device tracking for logged-in Pinterest users:
- User saves Pin on mobile
- User purchases on desktop
- Both interactions counted in conversion path
Conversion Insights
View attribution data in Pinterest Analytics:
Available Metrics:
- Total conversions
- Click-through conversions
- View-through conversions
- Earned conversions (organic saves/clicks from Promoted Pins)
Breakdown Options:
- By campaign, ad group, Pin
- By device (mobile, desktop, tablet)
- By audience segment
- Over time
Debugging & Validation
Pinterest Tag Helper
Chrome extension for validating Pinterest Tag:
- Install Pinterest Tag Helper extension
- Visit page with Pinterest Tag
- Check status:
- Tag detected and firing
- Events tracked
- Parameters passed
- Warnings or errors
Tag Health in Ads Manager
Verify tag status in Pinterest:
- Navigate to Ads > Conversions
- Check Tag Health indicator
- Review:
- Tag status (active/inactive)
- Events received
- Last event timestamp
- Implementation errors
Conversion Event Manager
Test and validate conversion events:
Ads Manager > Conversions:
- View all conversion events
- Check event status (active/paused)
- See recent conversion count
- Test event firing
Real-Time Event Monitoring
View recent events in Pinterest:
- Navigate to Conversions page
- Click on conversion event
- View Event History tab
- See events from last 24 hours with:
- Timestamp
- Event parameters
- Source (tag vs API)
Browser Console Testing
Verify Pinterest Tag in browser console:
// Check if pintrk is loaded
if (typeof window.pintrk !== 'undefined') {
console.log('Pinterest Tag loaded');
console.log('Tag queue:', window.pintrk.queue);
} else {
console.error('Pinterest Tag not found');
}
// Fire test event
pintrk('track', 'custom', {
event_id: 'test_' + Date.now()
});
Common Issues
Tag not firing:
- Verify Tag ID is correct
- Check script loads before events fire
- Ensure no JavaScript errors in console
- Test in incognito mode to rule out extensions
Events not appearing:
- Wait 15-30 minutes for events to process
- Verify event name is correct (case-sensitive)
- Check required parameters are included
- Review Tag Health for errors
Low match rates:
- Implement enhanced matching with hashed emails
- Use Conversions API for server-side tracking
- Include more user identifiers
- Verify hashing is done correctly (SHA256)
Best Practices
Implementation
- Install Pinterest Tag on all pages for remarketing and full funnel tracking
- Use both Tag and Conversions API for maximum data quality
- Implement enhanced matching with hashed user data
- Use Google Tag Manager for easier tag management
- Include product IDs that match your catalog feed
Event Strategy
- Track full funnel (PageVisit, AddToCart, Checkout)
- Use standard event names for optimal campaign delivery
- Create separate events for different conversion types
- Implement video tracking for content engagement
- Track searches to understand user intent
Data Quality
- Pass order_id for deduplication
- Include line_items with product details for Shopping campaigns
- Use consistent product_id format matching catalog
- Send accurate currency codes (3-letter ISO format)
- Hash all PII before sending (SHA256)
Pinterest Shopping
- Match product_id to catalog feed exactly
- Include all required fields (product_id, price, quantity)
- Track PageVisit on product detail pages
- Implement AddToCart event for remarketing
- Use Checkout event for purchase conversions
Privacy & Compliance
- Implement consent management for GDPR/CCPA
- Hash all PII using SHA256 before sending
- Use opt_out parameter for users who decline tracking
- Update privacy policy to disclose Pinterest tracking
- Respect Limited Data Use settings for California users
Optimization
- Use conversion-based bidding for Shopping campaigns
- Optimize to Checkout events for ecommerce
- Create audiences from PageVisit and AddToCart events
- Exclude converted users from acquisition campaigns
- Test different attribution windows based on customer journey
Catalog Campaigns
- Sync product catalog before implementing conversion tracking
- Ensure product_id consistency between catalog and events
- Include product_variant for items with multiple options
- Track out-of-stock status in catalog
- Update prices in real-time or daily
Testing
- Use Pinterest Tag Helper to verify implementation
- Test events on staging environment first
- Generate test conversion and verify in Ads Manager
- Check Event History for parameter accuracy
- Monitor Tag Health for 48 hours after launch
Reporting
- Break down by device to understand mobile vs desktop performance
- View earned conversions to measure organic amplification
- Compare attribution windows to understand impact
- Segment by audience to optimize targeting
- Export conversion data for external analysis
Creative Optimization
- Track saves and clicks to measure Pin engagement
- Analyze video completion rates for video Pins
- Test different Pin formats (standard, carousel, video)
- Use conversion data to inform creative direction
- Optimize for mobile where most Pinterest activity occurs