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 10 DSPs:

DSPID
DV360dv360
The Trade Deskttd
CM360cm360
Adformadform
Xandrxandr
RTB Housertbhouse
Amazonamazon
Active Agentactiveagent
StackAdaptstackadapt
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.

Macro syntax: ${MACRO_NAME}

MacroPurpose
INSERTION_ORDER_IDInsertion order identifier
CAMPAIGN_IDCampaign identifier
CREATIVE_IDCreative identifier
ADSTXT_AD_SYSTEM_DOMAINAds.txt ad system domain
BUNDLE_IDApp bundle identifier
SOURCE_URLSource URL of the placement
GDPRGDPR applicability flag
ADDTL_CONSENTAdditional consent string
AUCTION_IDAuction identifier
ADSXT_PUBLISHER_IDAds.txt publisher identifier
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%%

MacroPurpose
TTD_SITESite or app identifier
TTD_TDIDThe Trade Desk unified identifier
TTD_CAMPAIGNIDCampaign identifier
TTD_CREATIVEIDCreative identifier
TTD_SUPPLYVENDORSupply vendor identifier
TTD_IMPRESSIONIDImpression identifier

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

MacroPurpose
eaidAccount identifier
eadvAdvertiser identifier
ebuyBuy/placement identifier
ecidCampaign identifier
epidPlacement identifier
eenvEnvironment identifier
esidSite identifier
edimpidDisplay impression identifier
sSource
uCustom variable
gGroup

Macro syntax: __MACRO_NAME__

MacroPurpose
ADFBNRDOMBanner domain
ADFCAMIDCampaign identifier
ADFCAMCampaign name
ADFCREIDCreative identifier
ADFCRECreative name
ADFTYPAd type
ADFHEIGHTAd height
ADFWIDTHAd width
ADFAPPIDApp identifier
ADFAPPNAMEApp name
ADFADGAPIDAd gap identifier
ADFIMPIDImpression identifier
ADFGDPRGDPR applicability flag
ADFGPPSIDGPP section identifier
ADFREFERERReferrer URL
ADFORDIDOrder identifier
ADFORDOrder name
ADFINVInventory name
ADFPLAIDPlacement identifier
ADFINVIDInventory identifier
ADFRTBDOMRTB domain
ADFDPIDData provider identifier
ADFLPLanding page
ADFOPTSTATOpt-out status
ADFGDPRCONSENTGDPR consent string
ADFUSPRIVACYUS privacy string
ADFUIDUser identifier

Macro syntax: ${MACRO_NAME}

MacroPurpose
CLICK_URLClick tracking URL
CLICK_URL_ENCURL-encoded click tracking URL
PUBLISHER_IDPublisher identifier
AUCTION_IDAuction identifier
EXT_APP_IDExternal app identifier
CREATIVE_IDCreative identifier
REFERER_URL_ENCURL-encoded referrer
SITE_IDSite identifier
GDPRGDPR applicability flag
GDPR_CONSENTGDPR consent string

Macro syntax: {MACRO_NAME}

MacroPurpose
CAMPAIGN_NAMECampaign name
CREATIVE_HASHCreative hash identifier
IMPRESSION_HASHImpression hash identifier
SSP_ADVERTISER_ENCRYPTEDEncrypted SSP advertiser identifier
REFERER_HOST_ENCRYPTEDEncrypted referrer host
APP_ID_ENCRYPTEDEncrypted app identifier

Macro syntax: {%macro}

MacroPurpose
ad_cfidAd configuration identifier
creative_cfidCreative configuration identifier
campaign_cfidCampaign configuration identifier
short_redirect_urlEncodeURL-encoded redirect URL
request_aridRequest identifier

Macro syntax: %macro%

MacroPurpose
banneridBanner identifier
profile:adslotidAd slot identifier
campaignidCampaign identifier
orderidOrder identifier
advertiseridAdvertiser identifier
websiteidWebsite identifier
sspSupply-side platform

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}

MacroPurpose
SA_REF_IDReference identifier
SA_BUNDLE_IDBundle identifier
SA_CREATIVE_IDCreative identifier
SA_CAMPAIGN_IDCampaign identifier
SA_REF_DOMAINReference domain
SA_REF_PAGEReference page URL
SA_LINE_ITEM_IDLine item identifier
SA_SOURCE_IDSource identifier
SA_ADVERTISER_IDAdvertiser identifier
SA_PLACEMENT_IDPlacement identifier

Remerge does not use DSP-specific macros. Tags are generated with only the base fraud0 parameters.



Imprint Privacy Policy Terms & Conditions DPA