Skip to content

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.

  1. Open Tag Management in the fraud0 interface.
  2. Select the tag you want to generate an In-Ad code for.
  3. Click the Get Code button to open the In-Ad Tag Code dialog.
  4. Select your DSP from the dropdown.
  5. Select the Tag Type that matches your ad server’s requirements.
  6. Copy the generated code and paste it into your ad server creative.

fraud0 In-Ad currently supports the following 11 DSPs:

DSPID
DV360dv360
The Trade Deskttd
CM360cm360
Adformadform
Xandrxandr
RTB Housertbhouse
Amazonamazon
Active Agentactiveagent
StackAdaptstackadapt
Quantcastquantcast
Remergeremerge

A None option is also available for custom setups without DSP-specific macros.

Tag TypeOutput FormatUse Case
JavaScript<script> tagStandard HTML creatives
Image Pixel<img> tagEnvironments where JavaScript is not allowed
Image (JS)JavaScript that injects an <img> elementHybrid approach for restricted environments
iFrame<iframe> tagSandboxed environments
CTVRaw URLConnected TV campaigns
URLRaw URLServer-to-server or redirect-based setups

The default tracking domain is api3.b2c.com. An alternative domain api.fraud0.com is available for accounts that require it.

For DSPs that support GDPR consent macros (DV360 and Active Agent), the vendor ID depends on the tracking domain:

DomainVendor ID
api.fraud0.com1204
api3.b2c.com1395

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.

DSPLine Item showsInsertion Order shows
DV360Campaign ID (CAMPAIGN_ID)Insertion order ID (INSERTION_ORDER_ID)
The Trade DeskCampaign ID (TTD_CAMPAIGNID)empty
CM360Campaign ID (%ebuy!)empty
AdformPlacement ID (ADFPLAID)Order ID (ADFORDID)
Xandremptyempty
RTB HouseCampaign name (CAMPAIGN_NAME)empty
AmazonAd config ID (ad_cfid)Campaign config ID (campaign_cfid)
Active AgentCampaign ID (campaignid)Order ID (orderid)
StackAdaptLine item ID (SA_LINE_ITEM_ID)Campaign ID (SA_CAMPAIGN_ID)
QuantcastAd set ID (AD_SET_ID)Campaign ID (CAMPAIGN_ID)
Remergeemptyempty

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}

MacroPurposefraud0 dimension
INSERTION_ORDER_IDInsertion order identifierInsertion Order
CAMPAIGN_IDCampaign identifierLine Item
CREATIVE_IDCreative identifier
ADSTXT_AD_SYSTEM_DOMAINAds.txt ad system domainSSP
BUNDLE_IDApp bundle identifierPlacement (app traffic)
SOURCE_URLSource URL of the placementPlacement URL
GDPRGDPR applicability flag
ADDTL_CONSENTAdditional consent string
AUCTION_IDAuction identifier
ADSXT_PUBLISHER_IDPublisher ID from the bid request (Google spells this macro without the second T)
EXCHANGE_IDExchange identifier
INVENTORY_SOURCE_EXTERNAL_IDInventory source external identifier
PUBLISHER_IDPublisher identifier
SOURCE_URL_ENCURL-encoded source URL
UNIVERSAL_SITE_IDUniversal site identifier
GDPR_CONSENT_1204 or GDPR_CONSENT_1395GDPR consent string (vendor ID depends on domain)

Macro syntax: %%MACRO_NAME%%

MacroPurposefraud0 dimension
TTD_SITESite or app identifierPlacement domain
TTD_TDIDThe Trade Desk unified identifier
TTD_CAMPAIGNIDCampaign identifierLine Item
TTD_CREATIVEIDCreative identifier
TTD_SUPPLYVENDORSupply vendor identifierSSP
TTD_IMPRESSIONIDImpression identifierExternal impression ID

Macro syntax: %macro! (for e-prefixed macros) or %macro (for others)

MacroPurposefraud0 dimension
eaidAd ID
eadvAdvertiser ID
ebuyCampaign IDLine Item
ecidCreative ID
epidPlacement IDPlacement ID
eenvEnvironment character (one-letter code for the CM360 ad tag type)
esidSite IDSite ID
edimpidImpression ID (impression event tags only)External impression ID
sSite keyname
uLanding page URL of the creative
gGeo key-values (country, region, city, postal code, DMA, bandwidth)

Macro syntax: __MACRO_NAME__

MacroPurposefraud0 dimension
ADFBNRDOMBanner domainPlacement domain
ADFCAMIDCampaign identifier
ADFCAMCampaign name
ADFCREIDCreative identifier
ADFCRECreative name
ADFTYPAd type
ADFHEIGHTAd height
ADFWIDTHAd width
ADFAPPIDApp identifier
ADFAPPNAMEApp namePlacement (app traffic)
ADFADGAPIDAd gap identifier
ADFIMPIDImpression identifierExternal impression ID
ADFGDPRGDPR applicability flag
ADFGPPSIDGPP section identifier
ADFREFERERReferrer URLPlacement URL
ADFORDIDOrder identifierInsertion Order
ADFORDOrder name
ADFINVInventory nameSSP
ADFPLAIDPlacement identifierLine Item
ADFINVIDInventory identifier
ADFRTBDOMRTB domain
ADFDPIDData provider identifier
ADFLPLanding page
ADFOPTSTATOpt-out status
ADFGDPRCONSENTGDPR consent string
ADFUSPRIVACYUS privacy string
ADFUIDUser identifier

Macro syntax: ${MACRO_NAME}

MacroPurposefraud0 dimension
CLICK_URLClick tracking URL
CLICK_URL_ENCURL-encoded click tracking URL
PUBLISHER_IDPublisher identifierSSP
AUCTION_IDAuction identifierExternal impression ID
EXT_APP_IDExternal app identifierPlacement (app traffic)
CREATIVE_IDCreative identifier
REFERER_URL_ENCURL-encoded referrerPlacement domain
SITE_IDSite identifierPlacement URL
GDPRGDPR applicability flag
GDPR_CONSENTGDPR consent string

Macro syntax: {MACRO_NAME}

MacroPurposefraud0 dimension
CAMPAIGN_NAMECampaign nameLine Item
CREATIVE_HASHCreative hash identifier
IMPRESSION_HASHImpression hash identifierExternal impression ID
SSP_ADVERTISER_ENCRYPTEDEncrypted SSP advertiser identifierSSP
REFERER_HOST_ENCRYPTEDEncrypted referrer host
APP_ID_ENCRYPTEDEncrypted app identifierPlacement (app traffic)

Macro syntax: {%macro}

MacroPurposefraud0 dimension
ad_cfidAd configuration identifierLine Item
creative_cfidCreative configuration identifier
campaign_cfidCampaign configuration identifierInsertion Order
short_redirect_urlEncodeURL-encoded redirect URL
request_aridRequest identifierExternal impression ID

Macro syntax: %macro%

MacroPurposefraud0 dimension
banneridBanner identifier
profile:adslotidAd slot identifierPlacement ID
campaignidCampaign identifierLine Item
orderidOrder identifierInsertion Order
advertiseridAdvertiser identifier
websiteidWebsite identifierSite ID
sspSupply-side platformSSP

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).

Macro syntax: {MACRO_NAME}

MacroPurposefraud0 dimension
SA_REF_IDReference identifierExternal impression ID
SA_BUNDLE_IDBundle identifierPlacement (app traffic)
SA_CREATIVE_IDCreative identifier
SA_CAMPAIGN_IDCampaign identifierInsertion Order
SA_REF_DOMAINReference domainPlacement domain
SA_REF_PAGEReference page URLPlacement URL
SA_LINE_ITEM_IDLine item identifierLine Item
SA_SOURCE_IDSource identifierSSP
SA_ADVERTISER_IDAdvertiser identifier
SA_PLACEMENT_IDPlacement identifierPlacement ID

Macro syntax: ${MACRO_NAME}

MacroPurposefraud0 dimension
CAMPAIGN_IDCampaign identifierInsertion Order
AD_SET_IDAd set identifierLine Item
CREATIVE_IDCreative identifier
DOMAINPlacement domainPlacement domain
AUCTION_URLAuction URL of the placementPlacement URL
BUNDLE_IDApp bundle identifierPlacement (app traffic)

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