Pinterest Ads Server-Side vs Client-Side Tracking | OpsBlu Docs

Pinterest Ads Server-Side vs Client-Side Tracking

Comparison of Pinterest Tag (client-side) and Conversions API (server-side) tracking approaches.

Tracking Comparison Overview

Pinterest offers two primary tracking methods: the Pinterest Tag (client-side JavaScript) and the Conversions API (server-side). Each has distinct advantages and limitations. A dual implementation combining both methods provides the most reliable and privacy-compliant tracking.

Client-Side Tracking (Pinterest Tag)

How It Works

  • JavaScript code loads in the user's browser on each page visit
  • Tag fires events based on page loads, clicks, and user interactions
  • Automatically captures browser data (user agent, IP address, _epik cookie)
  • Sends events directly from the browser to Pinterest's servers

Advantages

  • Easy implementation: Add tag code to your website header or deploy via GTM
  • Automatic data collection: Captures browser information, referrer, and page URL without custom coding
  • Real-time firing: Events fire immediately when user actions occur
  • Visual debugging: Pinterest Tag Helper extension provides instant visibility into tag firing
  • No backend development: Can be implemented by marketers without engineering resources

Limitations

  • Browser dependency: Requires JavaScript enabled and Pinterest domains not blocked
  • Privacy restrictions: Safari ITP, Firefox ETP, and ad blockers can prevent tag firing
  • Cookie limitations: Third-party cookie restrictions reduce attribution accuracy
  • Lost events: Page abandonment before tag loads results in missing events
  • Client-side failures: Network issues or script errors can prevent events from firing

Best Use Cases

  • PageVisit and ViewCategory tracking for top-of-funnel engagement
  • Quick implementation without backend resources
  • Capturing automatic browser data for Enhanced Match
  • Retargeting audiences based on website behavior
  • Testing and validating tracking before server-side implementation

Server-Side Tracking (Conversions API)

How It Works

  • Backend server sends events directly to Pinterest's API after user actions
  • Events are triggered by server-side logic (order confirmations, form submissions)
  • Requires passing hashed user data and browser information from client to server
  • Uses API credentials (access token) for authentication

Advantages

  • Privacy-compliant: Not affected by browser restrictions, ad blockers, or cookie limitations
  • Reliable event delivery: Events sent from your server are not blocked by client-side issues
  • Deduplication with tag: When combined with tag, provides redundancy and improves data accuracy
  • Complete control: Full control over what data is sent and when
  • Offline events: Can send events that occur outside the browser (phone calls, in-store purchases, CRM updates)

Limitations

  • Requires development: Needs backend engineering to implement API endpoints
  • No automatic browser data: Must manually capture and pass user agent, IP, _epik cookie from client
  • Delayed events: Events may fire after the user action (e.g., after payment processing)
  • Debugging complexity: Requires server logs and API diagnostics instead of browser tools
  • Hashing responsibility: Must implement SHA-256 hashing for all PII before sending

Best Use Cases

  • High-value conversion events (Checkout, Signup, Lead)
  • Server-confirmed events (purchases after payment processing)
  • Privacy-focused implementations where client-side tracking is limited
  • Offline conversions (phone orders, in-store purchases)
  • Deduplication strategy alongside client-side tag for improved accuracy

Dual Implementation Strategy

Combining Pinterest Tag and Conversions API provides the most robust tracking:

Implementation Approach

  1. Deploy Pinterest Tag for all events (PageVisit, ViewCategory, AddToCart, Checkout).
  2. Deploy Conversions API for high-value conversion events (Checkout, Signup, Lead).
  3. Enable deduplication by sending the same event_id and event_name from both tag and API.
  4. Capture browser data on the client and pass to server for API calls (user_agent, IP, _epik).
  5. Use Enhanced Match in both tag and API with hashed user data (email, phone).

Data Flow Example

Client-Side (Pinterest Tag):

// User adds to cart
pintrk('track', 'AddToCart', {
  product_id: 'SKU_12345',
  product_name: 'Organic Cotton T-Shirt',
  product_category: 'Apparel',
  product_price: 29.99,
  product_quantity: 1,
  currency: 'USD',
  value: 29.99
}, {
  em: [hashedEmail],
  event_id: 'cart_abc123'
});

Server-Side (Conversions API):

{
  "data": [{
    "event_name": "addtocart",
    "action_source": "web",
    "event_time": 1640000000,
    "event_id": "cart_abc123",
    "event_source_url": "https://example.com/product/shirt",
    "user_data": {
      "em": ["hashed_email"],
      "client_ip_address": "192.0.2.1",
      "client_user_agent": "Mozilla/5.0...",
      "click_id": "_epik_value"
    },
    "custom_data": {
      "product_id": "SKU_12345",
      "product_name": "Organic Cotton T-Shirt",
      "product_category": "Apparel",
      "product_price": "29.99",
      "product_quantity": 1,
      "currency": "USD",
      "value": "29.99"
    }
  }]
}

Result: Pinterest receives both events, recognizes they have the same event_id and event_name, and deduplicates to count only one event. If one method fails, the other provides backup.

When to Use Each Method

Scenario Pinterest Tag Conversions API Both
High-value conversions (purchases, leads)
Top-of-funnel engagement (page views, searches)
Quick launch without backend resources
Privacy-focused implementation
iOS 14+ and browser restriction mitigation
Offline or phone conversions
Server-confirmed events (post-payment)
Testing and validation
Audience building from website behavior
Shopping campaigns with catalog

Migration Path

From Tag-Only to Dual Implementation

  1. Audit current tag setup: Review Event History to confirm all events are firing correctly.
  2. Identify high-value events: Prioritize Checkout, Signup, and Lead for Conversions API.
  3. Implement server-side endpoints: Build API integration for priority events.
  4. Add deduplication logic: Generate unique event_id on client and pass to server.
  5. Test in staging: Validate events appear in Event History with proper deduplication.
  6. Launch gradually: Enable API for one event at a time, monitor for errors.
  7. Expand coverage: Add more events to API over time as resources allow.

From No Tracking to Full Implementation

  1. Start with Pinterest Tag: Quick deployment via GTM for immediate data collection.
  2. Claim domain: Verify domain ownership in Pinterest Business Hub.
  3. Enable Enhanced Match: Add hashed email to tag for improved attribution.
  4. Plan server-side: Document high-value events for future Conversions API implementation.
  5. Build API integration: Develop backend endpoints for conversion events.
  6. Launch dual tracking: Enable both tag and API with deduplication.

Performance & Reliability Considerations

  • Tag load time: Pinterest Tag is lightweight (~10KB) and loads asynchronously, minimal impact on page speed.
  • API latency: Conversions API calls should complete in under 500ms; implement timeout handling.
  • Error handling: Log failed API calls for retry and debugging.
  • Rate limits: Pinterest API has rate limits; implement exponential backoff for retries.
  • Data retention: Pinterest retains event data for attribution windows (1-day, 7-day, 30-day view/click).

Compliance & Privacy

  • GDPR/CCPA: Both tag and API must respect user consent; do not fire if user rejects tracking.
  • Consent management: Integrate with CMP to block tag and API calls based on user choice.
  • Data minimization: Only send necessary data; avoid collecting excessive PII.
  • Hashing requirements: Always hash PII (email, phone, name) before sending via tag or API.
  • Right to deletion: Implement processes to stop sending data for users who request deletion.

Debugging & Troubleshooting

Client-Side (Tag)

  • Use Pinterest Tag Helper browser extension
  • Check browser console for JavaScript errors
  • Review GTM Preview mode for tag firing
  • Validate parameters in Tag Helper event details

Server-Side (API)

  • Check server logs for API request/response details
  • Review Pinterest Ads Manager Conversions API Diagnostics
  • Monitor Event History for event delivery and deduplication
  • Test API calls with curl or Postman before production deployment

Best Practices

  • Implement both Pinterest Tag and Conversions API for high-value events to maximize reliability.
  • Use the same event_id across tag and API to enable deduplication.
  • Always send Enhanced Match data (hashed email, phone) for improved attribution.
  • Capture _epik cookie from the browser and include in Conversions API calls.
  • Test tag and API separately before enabling deduplication.
  • Monitor Event History regularly to catch discrepancies between tag and API event counts.
  • Document your tracking architecture with flowcharts showing client and server event flows.