The Trade Desk Event Tracking | Blue Frog Docs

The Trade Desk Event Tracking

Complete guide to The Trade Desk Universal Pixel and conversion tracking

The Trade Desk Event Tracking

Overview

The Trade Desk (TTD) uses the Universal Pixel (UPixel) for conversion tracking, audience building, and campaign optimization across its demand-side platform. As a programmatic advertising platform, The Trade Desk provides enterprise-grade tracking for display, video, audio, connected TV, and native advertising across premium publisher inventory.

Standard Events

The Trade Desk Universal Pixel supports various event types:

Ecommerce Events

  • Purchase - Transaction completed
  • AddToCart - Product added to cart
  • ViewItem - Product page viewed
  • InitiateCheckout - Checkout started
  • AddPaymentInfo - Payment information added

Lead Generation Events

  • Lead - Form submission or lead capture
  • CompleteRegistration - Account registration
  • Subscribe - Newsletter or service subscription
  • Contact - Contact form or inquiry

Engagement Events

  • PageView - Standard page visit (automatically tracked)
  • ViewContent - Content page viewed
  • Search - Site search performed
  • Download - File or resource download

Custom Events

  • Custom - Business-specific conversion actions

Custom Events

Creating Custom Conversions

Define custom event tracking for specific business goals:

// Custom event example
ttd_dom_ready(function() {
  if (typeof TTDUniversalPixelApi === 'function') {
    var universalPixelApi = new TTDUniversalPixelApi();
    universalPixelApi.init("ADVERTISER_ID", ["TRACKER_ID"], "https://insight.adsrvr.org/track/up", "ttdUniversalPixelTags");
  }
});

// Fire custom event
ttdUniversalPixelTags.push({
  event: 'custom_event_name',
  event_id: 'unique_event_id',
  value: 25.00,
  currency: 'USD'
});

Event Parameters

Add parameters to any event:

ttdUniversalPixelTags.push({
  event: 'Purchase',
  event_id: 'ORDER_12345',
  value: 99.99,
  currency: 'USD',
  items: [{
    id: 'SKU_123',
    name: 'Blue Widget',
    quantity: 2,
    price: 49.99
  }]
});

Ecommerce Events

Purchase Tracking

Complete purchase implementation:

<!-- Universal Pixel Base Code (on all pages) -->
<script src="https://js.adsrvr.org/up_loader.1.1.0.js" type="text/javascript"></script>
<script type="text/javascript">
  ttd_dom_ready(function() {
    if (typeof TTDUniversalPixelApi === 'function') {
      var universalPixelApi = new TTDUniversalPixelApi();
      universalPixelApi.init("ADVERTISER_ID", ["TRACKER_ID"], "https://insight.adsrvr.org/track/up");
    }
  });
</script>

<!-- Purchase Event (on confirmation page) -->
<script type="text/javascript">
  ttd_dom_ready(function() {
    if (typeof TTDUniversalPixelApi === 'function') {
      var universalPixelApi = new TTDUniversalPixelApi();
      universalPixelApi.init("ADVERTISER_ID", ["PURCHASE_TRACKER_ID"], "https://insight.adsrvr.org/track/up");
    }
  });

  // Track purchase
  if (window.ttdUniversalPixelTags) {
    ttdUniversalPixelTags.push({
      event: 'Purchase',
      event_id: 'ORDER_12345',
      value: 149.99,
      currency: 'USD',
      items: [
        { id: 'SKU_123', quantity: 1, price: 99.99 },
        { id: 'SKU_456', quantity: 2, price: 25.00 }
      ]
    });
  }
</script>

Shopping Funnel Tracking

Track complete customer journey:

// View Item (Product Page)
ttdUniversalPixelTags.push({
  event: 'ViewItem',
  items: [{
    id: 'SKU_123',
    name: 'Blue Widget',
    price: 99.99
  }]
});

// Add to Cart
ttdUniversalPixelTags.push({
  event: 'AddToCart',
  value: 99.99,
  currency: 'USD',
  items: [{
    id: 'SKU_123',
    quantity: 1,
    price: 99.99
  }]
});

// Initiate Checkout
ttdUniversalPixelTags.push({
  event: 'InitiateCheckout',
  value: 149.99,
  currency: 'USD'
});

// Purchase
ttdUniversalPixelTags.push({
  event: 'Purchase',
  event_id: 'ORDER_12345',
  value: 149.99,
  currency: 'USD',
  items: [
    { id: 'SKU_123', quantity: 1, price: 99.99 },
    { id: 'SKU_456', quantity: 2, price: 25.00 }
  ]
});

Conversion Tracking

Implementation Methods

1. Universal Pixel (Standard)

JavaScript implementation:

<!-- Universal Pixel Script -->
<script src="https://js.adsrvr.org/up_loader.1.1.0.js" type="text/javascript"></script>
<script type="text/javascript">
  ttd_dom_ready(function() {
    if (typeof TTDUniversalPixelApi === 'function') {
      var universalPixelApi = new TTDUniversalPixelApi();
      universalPixelApi.init("YOUR_ADVERTISER_ID", ["YOUR_TRACKER_ID"], "https://insight.adsrvr.org/track/up");
    }
  });
</script>

<!-- Event Tracking -->
<script type="text/javascript">
  if (window.ttdUniversalPixelTags) {
    ttdUniversalPixelTags.push({
      event: 'Purchase',
      event_id: 'ORDER_12345',
      value: 99.99,
      currency: 'USD'
    });
  }
</script>

2. Image Pixel (Fallback)

For non-JavaScript environments:

<!-- Image Pixel -->
<img height="1" width="1" style="border-style:none;" alt="" src="https://insight.adsrvr.org/track/conv/?adv=ADVERTISER_ID&ct=TRACKER_ID&fmt=3&v=VALUE&vf=USD&orderid=ORDER_12345"/>

3. Server-Side Tracking

Server-to-server conversion tracking:

import requests

# Server-side conversion
pixel_url = "https://insight.adsrvr.org/track/conv/"
params = {
    "adv": "ADVERTISER_ID",
    "ct": "TRACKER_ID",
    "fmt": "3",
    "v": "99.99",
    "vf": "USD",
    "orderid": "ORDER_12345",
    "td1": "click_id",  # TTD click ID if available
    "upixel": "1"
}

response = requests.get(pixel_url, params=params)

4. Google Tag Manager

Deploy via GTM:

Base Pixel Tag:

<!-- GTM Custom HTML Tag - All Pages -->
<script src="https://js.adsrvr.org/up_loader.1.1.0.js" type="text/javascript"></script>
<script type="text/javascript">
  ttd_dom_ready(function() {
    if (typeof TTDUniversalPixelApi === 'function') {
      var universalPixelApi = new TTDUniversalPixelApi();
      universalPixelApi.init("{{TTD Advertiser ID}}", ["{{TTD Tracker ID}}"], "https://insight.adsrvr.org/track/up");
    }
  });
</script>

Conversion Event Tag:

<script type="text/javascript">
  if (window.ttdUniversalPixelTags) {
    ttdUniversalPixelTags.push({
      event: 'Purchase',
      event_id: {{Transaction ID}},
      value: {{Transaction Value}},
      currency: 'USD'
    });
  }
</script>

Multiple Trackers

Track same event to multiple tracker IDs:

// Initialize with multiple trackers
ttd_dom_ready(function() {
  if (typeof TTDUniversalPixelApi === 'function') {
    var universalPixelApi = new TTDUniversalPixelApi();
    universalPixelApi.init("ADVERTISER_ID",
      ["TRACKER_ID_1", "TRACKER_ID_2", "TRACKER_ID_3"],
      "https://insight.adsrvr.org/track/up");
  }
});

Offline Conversions

Server-Side Upload

Upload offline conversions via server-to-server calls:

// Node.js server-side conversion
const axios = require('axios');

const conversionData = {
  adv: 'ADVERTISER_ID',
  ct: 'TRACKER_ID',
  fmt: '3',
  v: '149.99',
  vf: 'USD',
  orderid: 'OFFLINE_ORDER_12345',
  td1: click_id,  // TTD click ID from CRM
  td2: customer_id,
  upixel: '1'
};

await axios.get('https://insight.adsrvr.org/track/conv/', {
  params: conversionData
});

CRM Integration

Connect CRM for offline conversion tracking:

Implementation:

  1. Capture TTD click ID (TDID parameter or cookie)
  2. Store in CRM with customer record
  3. Export offline conversions with TTD ID
  4. Upload via server-side pixel

Click ID Capture:

// Capture TDID from URL or cookie
function getTTDID() {
  // From URL parameter
  const urlParams = new URLSearchParams(window.location.search);
  const tdid = urlParams.get('tdid');

  // Or from cookie
  // const tdid = getCookie('TDID');

  if (tdid) {
    // Store in form or database
    document.getElementById('tdid_field').value = tdid;
  }
}

Attribution

Attribution Windows

The Trade Desk uses customizable attribution:

Default Settings:

  • Post-click: 30 days
  • Post-view: 1 day

Customizable:

  • Click attribution: 1-90 days
  • View attribution: 1-30 days
  • Configure per tracker in platform

Attribution Models

The Trade Desk supports multiple attribution models:

  • Last Touch - Last TTD interaction gets credit
  • First Touch - First TTD interaction gets credit
  • Linear - Equal credit across all TTD interactions
  • Time Decay - More recent interactions get more credit
  • Data-Driven - Algorithmic attribution (requires sufficient data)

Configure in: TTD Platform > Reporting > Attribution Settings

Cross-Device Attribution

The Trade Desk provides:

  • Unified ID 2.0 - Identity graph for cross-device tracking
  • Deterministic matching - Logged-in user identification
  • Probabilistic matching - Device graph connections

Cross-Channel Measurement

Track conversions across TTD channels:

  • Display
  • Video (online and CTV)
  • Audio
  • Native
  • Digital out-of-home

Debugging & Validation

Browser DevTools

Verify pixel implementation:

Network Tab:

  1. Open browser DevTools
  2. Navigate to Network tab
  3. Filter for "adsrvr.org"
  4. Verify:
    • up_loader.js loads successfully
    • /track/up requests fire
    • Parameters pass correctly

Console Verification:

// Check if UPixel loaded
if (typeof TTDUniversalPixelApi !== 'undefined') {
  console.log('TTD Universal Pixel loaded');
} else {
  console.error('TTD Universal Pixel not found');
}

// Check pixel queue
console.log(window.ttdUniversalPixelTags);

Platform Validation

Verify in The Trade Desk platform:

  1. Navigate to Tracking Tags section
  2. Select your tracker
  3. Review Recent Activity:
    • Impression volume
    • Click volume
    • Conversion volume
  4. Check for implementation warnings

Test Conversions

Generate test conversions:

  1. Create test tracker in TTD platform
  2. Implement test tracker on staging site
  3. Generate test conversion
  4. Verify appears in platform within 1-2 hours

Common Issues

Pixel not loading:

  • Verify advertiser ID and tracker ID correct
  • Check up_loader.js loads without errors
  • Ensure ttd_dom_ready function executes
  • Test without content blockers

Conversions not tracking:

  • Verify tracker ID matches platform configuration
  • Check event fires after page load
  • Confirm value format is numeric
  • Review attribution window settings

Duplicate conversions:

  • Implement event_id for deduplication
  • Check pixel doesn't fire multiple times
  • Verify GTM triggers aren't overlapping

Best Practices

Implementation

  1. Use Universal Pixel for all modern implementations
  2. Implement on all pages for complete user journey
  3. Use unique tracker IDs for different conversion types
  4. Include event_id for deduplication
  5. Deploy via GTM for centralized management

Event Strategy

  1. Create separate trackers for different conversion values
  2. Track micro-conversions for audience building
  3. Use multiple trackers for funnel analysis
  4. Implement value-based tracking for ecommerce
  5. Track post-view conversions separately

Data Quality

  1. Pass accurate conversion values for optimization
  2. Use consistent currency codes (USD, EUR, etc.)
  3. Include order IDs for deduplication
  4. Send item-level data for product-level insights
  5. Regular audits of pixel implementation

Privacy & Compliance

  1. Implement consent management for GDPR/CCPA
  2. Use Unified ID 2.0 for privacy-forward identity
  3. Honor user opt-outs via platform controls
  4. Update privacy policy to disclose TTD tracking
  5. Follow TTD's data policies for compliant usage

Optimization

  1. Use conversion-based bidding for performance campaigns
  2. Leverage Koa AI for automated optimization
  3. Create audience segments from converters
  4. Exclude recent converters from acquisition
  5. Test different attribution windows based on sales cycle

Campaign Strategy

  1. Align trackers with campaign objectives
  2. Use cross-device targeting for complete reach
  3. Leverage CTV for upper-funnel awareness
  4. Implement frequency capping to avoid fatigue
  5. Test different creatives with A/B tracking

Measurement

  1. Track incrementality with control groups
  2. Measure cross-channel impact via attribution
  3. Monitor view-through vs click-through conversions
  4. Analyze conversion paths for optimization
  5. Export data to BI tools via API

Programmatic Best Practices

  1. Use private marketplace deals for premium inventory
  2. Implement brand safety controls
  3. Leverage first-party data for targeting
  4. Test different supply paths for efficiency
  5. Monitor viewability and ad fraud metrics

Reporting

  1. Break down by channel (display, video, CTV, audio)
  2. Segment by device and operating system
  3. Compare attribution models for insights
  4. Track conversion lag to optimize windows
  5. Create custom reports via API

Testing

  1. Test on staging environment before production
  2. Verify all tracker IDs are correct
  3. Generate test conversions for validation
  4. Monitor for first 48 hours after launch
  5. Use browser DevTools for troubleshooting
// SYS.FOOTER