In-Ad Code Reference
This reference covers everything you need to know about generating fraud0 In-Ad tracking tags: supported DSPs, tag types, domain options, GDPR consent, and the full set of macros for each DSP.
How to generate your tag
Section titled “How to generate your tag”- Open Tag Management in the fraud0 interface.
- Select the tag you want to generate an In-Ad code for.
- Click the Get Code button to open the In-Ad Tag Code dialog.
- Select your DSP from the dropdown.
- Select the Tag Type that matches your ad server’s requirements.
- Copy the generated code and paste it into your ad server creative.
Supported DSPs
Section titled “Supported DSPs”fraud0 In-Ad currently supports the following 11 DSPs:
| DSP | ID |
|---|---|
| DV360 | dv360 |
| The Trade Desk | ttd |
| CM360 | cm360 |
| Adform | adform |
| Xandr | xandr |
| RTB House | rtbhouse |
| Amazon | amazon |
| Active Agent | activeagent |
| StackAdapt | stackadapt |
| Quantcast | quantcast |
| Remerge | remerge |
A None option is also available for custom setups without DSP-specific macros.
Tag types
Section titled “Tag types”| Tag Type | Output Format | Use Case |
|---|---|---|
| JavaScript | <script> tag | Standard HTML creatives |
| Image Pixel | <img> tag | Environments where JavaScript is not allowed |
| Image (JS) | JavaScript that injects an <img> element | Hybrid approach for restricted environments |
| iFrame | <iframe> tag | Sandboxed environments |
| CTV | Raw URL | Connected TV campaigns |
| URL | Raw URL | Server-to-server or redirect-based setups |
Domain selection
Section titled “Domain selection”The default tracking domain is api3.b2c.com. An alternative domain api.fraud0.com is available for accounts that require it.
GDPR consent
Section titled “GDPR consent”For DSPs that support GDPR consent macros (DV360 and Active Agent), the vendor ID depends on the tracking domain:
| Domain | Vendor ID |
|---|---|
api.fraud0.com | 1204 |
api3.b2c.com | 1395 |
DSP macro reference
Section titled “DSP macro reference”Each DSP uses its own macro syntax. The tables below list every macro that fraud0 includes in the generated tag for each DSP, and — where applicable — which dimension the value populates in the fraud0 dashboard.
Campaign hierarchy at a glance
Section titled “Campaign hierarchy at a glance”| DSP | Line Item shows | Insertion Order shows |
|---|---|---|
| DV360 | Campaign ID (CAMPAIGN_ID) | Insertion order ID (INSERTION_ORDER_ID) |
| The Trade Desk | Campaign ID (TTD_CAMPAIGNID) | empty |
| CM360 | Campaign ID (%ebuy!) | empty |
| Adform | Placement ID (ADFPLAID) | Order ID (ADFORDID) |
| Xandr | empty | empty |
| RTB House | Campaign name (CAMPAIGN_NAME) | empty |
| Amazon | Ad config ID (ad_cfid) | Campaign config ID (campaign_cfid) |
| Active Agent | Campaign ID (campaignid) | Order ID (orderid) |
| StackAdapt | Line item ID (SA_LINE_ITEM_ID) | Campaign ID (SA_CAMPAIGN_ID) |
| Quantcast | Ad set ID (AD_SET_ID) | Campaign ID (CAMPAIGN_ID) |
| Remerge | empty | empty |
An empty dimension means the DSP has no equivalent concept or exposes no macro for it — not that data is missing. RTB House is the only DSP that reports a campaign name rather than a numeric ID in the Line Item dimension.
A dash (–) in the per-DSP tables below means the macro is included in the tag but is not surfaced as a filterable dimension in the dashboard. Creative identifiers are collected for every DSP that exposes them, but Creative is not currently a dashboard dimension, so those rows show a dash. App bundle identifiers feed the Placement dimension for app traffic rather than a separate App dimension.
The full set of In-Ad dashboard dimensions is: Placement, Placement domain, Placement URL, Placement ID, Site ID, External impression ID, DSP, Ad format, Insertion Order, SSP, Country, Line Item, and Date.
Macro syntax: ${MACRO_NAME}
| Macro | Purpose | fraud0 dimension |
|---|---|---|
INSERTION_ORDER_ID | Insertion order identifier | Insertion Order |
CAMPAIGN_ID | Campaign identifier | Line Item |
CREATIVE_ID | Creative identifier | – |
ADSTXT_AD_SYSTEM_DOMAIN | Ads.txt ad system domain | SSP |
BUNDLE_ID | App bundle identifier | Placement (app traffic) |
SOURCE_URL | Source URL of the placement | Placement URL |
GDPR | GDPR applicability flag | – |
ADDTL_CONSENT | Additional consent string | – |
AUCTION_ID | Auction identifier | – |
ADSXT_PUBLISHER_ID | Publisher ID from the bid request (Google spells this macro without the second T) | – |
EXCHANGE_ID | Exchange identifier | – |
INVENTORY_SOURCE_EXTERNAL_ID | Inventory source external identifier | – |
PUBLISHER_ID | Publisher identifier | – |
SOURCE_URL_ENC | URL-encoded source URL | – |
UNIVERSAL_SITE_ID | Universal site identifier | – |
GDPR_CONSENT_1204 or GDPR_CONSENT_1395 | GDPR consent string (vendor ID depends on domain) | – |
The Trade Desk
Section titled “The Trade Desk”Macro syntax: %%MACRO_NAME%%
| Macro | Purpose | fraud0 dimension |
|---|---|---|
TTD_SITE | Site or app identifier | Placement domain |
TTD_TDID | The Trade Desk unified identifier | – |
TTD_CAMPAIGNID | Campaign identifier | Line Item |
TTD_CREATIVEID | Creative identifier | – |
TTD_SUPPLYVENDOR | Supply vendor identifier | SSP |
TTD_IMPRESSIONID | Impression identifier | External impression ID |
Macro syntax: %macro! (for e-prefixed macros) or %macro (for others)
| Macro | Purpose | fraud0 dimension |
|---|---|---|
eaid | Ad ID | – |
eadv | Advertiser ID | – |
ebuy | Campaign ID | Line Item |
ecid | Creative ID | – |
epid | Placement ID | Placement ID |
eenv | Environment character (one-letter code for the CM360 ad tag type) | – |
esid | Site ID | Site ID |
edimpid | Impression ID (impression event tags only) | External impression ID |
s | Site keyname | – |
u | Landing page URL of the creative | – |
g | Geo key-values (country, region, city, postal code, DMA, bandwidth) | – |
Adform
Section titled “Adform”Macro syntax: __MACRO_NAME__
| Macro | Purpose | fraud0 dimension |
|---|---|---|
ADFBNRDOM | Banner domain | Placement domain |
ADFCAMID | Campaign identifier | – |
ADFCAM | Campaign name | – |
ADFCREID | Creative identifier | – |
ADFCRE | Creative name | – |
ADFTYP | Ad type | – |
ADFHEIGHT | Ad height | – |
ADFWIDTH | Ad width | – |
ADFAPPID | App identifier | – |
ADFAPPNAME | App name | Placement (app traffic) |
ADFADGAPID | Ad gap identifier | – |
ADFIMPID | Impression identifier | External impression ID |
ADFGDPR | GDPR applicability flag | – |
ADFGPPSID | GPP section identifier | – |
ADFREFERER | Referrer URL | Placement URL |
ADFORDID | Order identifier | Insertion Order |
ADFORD | Order name | – |
ADFINV | Inventory name | SSP |
ADFPLAID | Placement identifier | Line Item |
ADFINVID | Inventory identifier | – |
ADFRTBDOM | RTB domain | – |
ADFDPID | Data provider identifier | – |
ADFLP | Landing page | – |
ADFOPTSTAT | Opt-out status | – |
ADFGDPRCONSENT | GDPR consent string | – |
ADFUSPRIVACY | US privacy string | – |
ADFUID | User identifier | – |
Macro syntax: ${MACRO_NAME}
| Macro | Purpose | fraud0 dimension |
|---|---|---|
CLICK_URL | Click tracking URL | – |
CLICK_URL_ENC | URL-encoded click tracking URL | – |
PUBLISHER_ID | Publisher identifier | SSP |
AUCTION_ID | Auction identifier | External impression ID |
EXT_APP_ID | External app identifier | Placement (app traffic) |
CREATIVE_ID | Creative identifier | – |
REFERER_URL_ENC | URL-encoded referrer | Placement domain |
SITE_ID | Site identifier | Placement URL |
GDPR | GDPR applicability flag | – |
GDPR_CONSENT | GDPR consent string | – |
RTB House
Section titled “RTB House”Macro syntax: {MACRO_NAME}
| Macro | Purpose | fraud0 dimension |
|---|---|---|
CAMPAIGN_NAME | Campaign name | Line Item |
CREATIVE_HASH | Creative hash identifier | – |
IMPRESSION_HASH | Impression hash identifier | External impression ID |
SSP_ADVERTISER_ENCRYPTED | Encrypted SSP advertiser identifier | SSP |
REFERER_HOST_ENCRYPTED | Encrypted referrer host | – |
APP_ID_ENCRYPTED | Encrypted app identifier | Placement (app traffic) |
Amazon
Section titled “Amazon”Macro syntax: {%macro}
| Macro | Purpose | fraud0 dimension |
|---|---|---|
ad_cfid | Ad configuration identifier | Line Item |
creative_cfid | Creative configuration identifier | – |
campaign_cfid | Campaign configuration identifier | Insertion Order |
short_redirect_urlEncode | URL-encoded redirect URL | – |
request_arid | Request identifier | External impression ID |
Active Agent
Section titled “Active Agent”Macro syntax: %macro%
| Macro | Purpose | fraud0 dimension |
|---|---|---|
bannerid | Banner identifier | – |
profile:adslotid | Ad slot identifier | Placement ID |
campaignid | Campaign identifier | Line Item |
orderid | Order identifier | Insertion Order |
advertiserid | Advertiser identifier | – |
websiteid | Website identifier | Site ID |
ssp | Supply-side platform | SSP |
For CTV tag types, the websiteid parameter uses the profile:DOMAIN macro instead.
Active Agent tags also include GDPR consent macros when using the api.fraud0.com domain (vendor ID 1204) or the api3.b2c.com domain (vendor ID 1395).
StackAdapt
Section titled “StackAdapt”Macro syntax: {MACRO_NAME}
| Macro | Purpose | fraud0 dimension |
|---|---|---|
SA_REF_ID | Reference identifier | External impression ID |
SA_BUNDLE_ID | Bundle identifier | Placement (app traffic) |
SA_CREATIVE_ID | Creative identifier | – |
SA_CAMPAIGN_ID | Campaign identifier | Insertion Order |
SA_REF_DOMAIN | Reference domain | Placement domain |
SA_REF_PAGE | Reference page URL | Placement URL |
SA_LINE_ITEM_ID | Line item identifier | Line Item |
SA_SOURCE_ID | Source identifier | SSP |
SA_ADVERTISER_ID | Advertiser identifier | – |
SA_PLACEMENT_ID | Placement identifier | Placement ID |
Quantcast
Section titled “Quantcast”Macro syntax: ${MACRO_NAME}
| Macro | Purpose | fraud0 dimension |
|---|---|---|
CAMPAIGN_ID | Campaign identifier | Insertion Order |
AD_SET_ID | Ad set identifier | Line Item |
CREATIVE_ID | Creative identifier | – |
DOMAIN | Placement domain | Placement domain |
AUCTION_URL | Auction URL of the placement | Placement URL |
BUNDLE_ID | App bundle identifier | Placement (app traffic) |
Remerge
Section titled “Remerge”Remerge does not use DSP-specific macros. Tags are generated with only the base fraud0 parameters, so no DSP dimensions (Line Item, Insertion Order, SSP, and so on) are populated for Remerge tags.
Imprint Privacy Policy Terms & Conditions DPA