> ## Documentation Index
> Fetch the complete documentation index at: https://data-foundation.rockerbox.com/llms.txt
> Use this file to discover all available pages before exploring further.

# The Trade Desk

> Learn how to set up The Trade Desk spend API integration with Rockerbox

## Overview

Rockerbox provides comprehensive integration with The Trade Desk (TTD) for tracking programmatic advertising across Display, Video, OTT, and Audio inventory. The integration includes both API-based spend reporting and impression/click tracking.

## Prerequisites

Before setting up the integration, you'll need:

* An active The Trade Desk advertiser account
* MyReports API access from The Trade Desk
* Access letter authorizing Rockerbox partnership
* Four authentication credentials: Partner ID, Account ID, Username, Password

## Requesting API Access

1. Contact your TTD representative to request MyReports API access
2. Send the following message:
   ```text wrap theme={null}
   We need our partner, Rockerbox, to access the reporting API in order to report on TTD spend in the Rockerbox platform. We approve Rockerbox to access the API on our behalf. Please send over the access letter so that we can complete this step.
   ```
3. Request access to these specific Report IDs:
   * **Go-forward spend**: 2554829
   * **Historical spend**: 2681145

## Setup Process

1. Navigate to the [Advertising Platforms](https://app.rockerbox.com/v3/data/marketing/advertising_platforms/connect) page
2. Find and select The Trade Desk from the list of platforms
3. Click "Connect" and enter credentials:
   * Partner ID
   * Account ID
   * Username
   * Password
4. Implement tracking (URL parameters and/or impression pixels)
5. Verify deployment one day post-launch via Digital Advertising page

## Tracking Implementation

### Critical Requirement

**Match pixel to inventory type** - Using the wrong pixel type (e.g., Display pixel on Video inventory) will cause tracking failures.

## URL Tracking Parameter Explanation

| Parameter         | Macro                         | Description                |
| ----------------- | ----------------------------- | -------------------------- |
| `td_adgroupid`    | `%%TTD_ADGROUPID%%`           | Ad Group ID (required)     |
| `td_campaignid`   | `%%TTD_CAMPAIGNID%%`          | Campaign ID (required)     |
| `td_creativeid`   | `%%TTD_CREATIVEID%%`          | Creative ID (required)     |
| `td_supplyvendor` | `%%TTD_SUPPLYVENDOR_INT%%`    | Supply Vendor (required)   |
| `td_site`         | `%%TTD_SITE%%`                | Site (required)            |
| `td_type`         | `display` or `video` or `ott` | Inventory Type (hardcoded) |

### Display (Desktop) Inventory

```text wrap theme={null}
td_campaignid=%%TTD_CAMPAIGNID%%&td_adgroupid=%%TTD_ADGROUPID%%&td_creativeid=%%TTD_CREATIVEID%%&td_supplyvendor=%%TTD_SUPPLYVENDOR_INT%%&td_site=%%TTD_SITE%%&td_type=display
```

### Video Inventory

```text wrap theme={null}
td_campaignid=%%TTD_CAMPAIGNID%%&td_adgroupid=%%TTD_ADGROUPID%%&td_creativeid=%%TTD_CREATIVEID%%&td_supplyvendor=%%TTD_SUPPLYVENDOR_INT%%&td_site=%%TTD_SITE%%&td_type=video
```

### OTT (Over-the-Top) Inventory

```text wrap theme={null}
td_campaignid=%%TTD_CAMPAIGNID%%&td_adgroupid=%%TTD_ADGROUPID%%&td_creativeid=%%TTD_CREATIVEID%%&td_supplyvendor=%%TTD_SUPPLYVENDOR_INT%%&td_site=%%TTD_SITE%%&td_type=ott
```

## Impression Pixel Tracking

Impression pixels provide user-level tracking for view-based attribution. **Critical**: Use the correct pixel for your inventory type.

**Parameters:**

| Parameter      | Macro                                     | Description                     |
| -------------- | ----------------------------------------- | ------------------------------- |
| `tier_one`     | `ttd-display` or `ttd-video` or `ttd-ott` | Platform identifier (hardcoded) |
| `tier_two`     | `%%TTD_CAMPAIGNID%%`                      | Campaign ID (required)          |
| `tier_three`   | `%%TTD_ADGROUPID%%`                       | Ad Group ID (required)          |
| `tier_four`    | `%%TTD_CREATIVEID%%`                      | Creative ID (required)          |
| `tier_five`    | `%%TTD_SUPPLYVENDOR_INT%%`                | Supply Vendor (required)        |
| `auction_id`   | `%%TTD_IMPRESSIONID%%`                    | Impression ID (required)        |
| `referrer`     | `%%TTD_SITE%%`                            | Site (required)                 |
| `td_partnerid` | `%%TTD_PARTNERID%%`                       | Partner ID                      |

### Display Pixel

```text wrap theme={null}
https://metrics.getrockerbox.com/track/v5?source=[SOURCE]&tier_one=ttd-display&tier_two=%%TTD_CAMPAIGNID%%&tier_three=%%TTD_ADGROUPID%%&tier_four=%%TTD_CREATIVEID%%&tier_five=%%TTD_SUPPLYVENDOR_INT%%&auction_id=%%TTD_IMPRESSIONID%%&referrer=%%TTD_SITE%%&td_partnerid=%%TTD_PARTNERID%%
```

**Note:** `[SOURCE]` is a hardcoded value that must be obtained from Rockerbox - it's your company's [Account ID](https://app.rockerbox.com/v3/settings/account).

### Video Pixel

```text wrap theme={null}
https://metrics.getrockerbox.com/track/v5?source=[SOURCE]&tier_one=ttd-video&tier_two=%%TTD_CAMPAIGNID%%&tier_three=%%TTD_ADGROUPID%%&tier_four=%%TTD_CREATIVEID%%&tier_five=%%TTD_SUPPLYVENDOR_INT%%&auction_id=%%TTD_IMPRESSIONID%%&referrer=%%TTD_SITE%%&td_partnerid=%%TTD_PARTNERID%%
```

**Note:** `[SOURCE]` is a hardcoded value that must be obtained from Rockerbox - it's your company's [Account ID](https://app.rockerbox.com/v3/settings/account).

**Note:** Same parameters as Display, but `tier_one=ttd-video`

### OTT/Streaming Audio Pixel

```text wrap theme={null}
https://metrics.getrockerbox.com/track/v5?source=[SOURCE]&tier_one=ttd-ott&tier_two=%%TTD_CAMPAIGNID%%&tier_three=%%TTD_ADGROUPID%%&tier_four=%%TTD_CREATIVEID%%&tier_five=%%TTD_SUPPLYVENDOR_INT%%&auction_id=%%TTD_IMPRESSIONID%%&referrer=%%TTD_SITE%%&td_partnerid=%%TTD_PARTNERID%%
```

**Note:** `[SOURCE]` is a hardcoded value that must be obtained from Rockerbox - it's your company's [Account ID](https://app.rockerbox.com/v3/settings/account).

**Note:** Same parameters as other pixels, but `tier_one=ttd-ott`

## Implementation Notes

* **Macros auto-populate**: All `%%TTD_*%%` macros are automatically filled by The Trade Desk when ads are served - no manual replacement needed
* **Inventory type matching is critical**: Ensure Display pixels are used on Display inventory, Video pixels on Video inventory, etc.
* **URL parameters use platform macros**: Parameters dynamically populate during ad serving
* **Follow standard UTM structure**: Maintain proper URL formatting

**The Trade Desk Resources:**

* [Tracking Tags Overview](https://partner.thetradedesk.com/v3/portal/data/doc/TrackingTagsOverview) (Partner Portal)
* [Static Tracking Tags](https://partner.thetradedesk.com/v3/portal/data/doc/TrackingTagsStatic) (Partner Portal)
* [Creative Specifications](https://www.thetradedesk.com/assets/global/documents/Creative_Specifications-en.pdf) (PDF)

**Note:** Partner Portal documentation requires TTD login access. Contact your Trade Desk representative for implementation assistance.

## Verification

After setup:

1. Confirm API credentials are properly configured
2. Verify impression pixels are firing correctly (check by inventory type)
3. Validate click tracking parameters are populating
4. Check spend data appears in Rockerbox dashboard one day post-launch
5. Use Digital Advertising page in Rockerbox for verification
6. Validate metrics match your Trade Desk reporting

## Troubleshooting

If you encounter any issues:

1. Verify MyReports API access has been granted
2. Confirm all four credentials are correct (Partner ID, Account ID, Username, Password)
3. Check that correct pixel type matches inventory type
4. Validate URL parameter configuration
5. Ensure access to both Report IDs (2554829, 2681145)
6. Contact [support@rockerbox.com](mailto:support@rockerbox.com) for additional assistance
