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 10 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 |
| 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.
Macro syntax: ${MACRO_NAME}
| Macro | Purpose |
|---|---|
INSERTION_ORDER_ID | Insertion order identifier |
CAMPAIGN_ID | Campaign identifier |
CREATIVE_ID | Creative identifier |
ADSTXT_AD_SYSTEM_DOMAIN | Ads.txt ad system domain |
BUNDLE_ID | App bundle identifier |
SOURCE_URL | Source URL of the placement |
GDPR | GDPR applicability flag |
ADDTL_CONSENT | Additional consent string |
AUCTION_ID | Auction identifier |
ADSXT_PUBLISHER_ID | Ads.txt publisher identifier |
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 |
|---|---|
TTD_SITE | Site or app identifier |
TTD_TDID | The Trade Desk unified identifier |
TTD_CAMPAIGNID | Campaign identifier |
TTD_CREATIVEID | Creative identifier |
TTD_SUPPLYVENDOR | Supply vendor identifier |
TTD_IMPRESSIONID | Impression identifier |
Macro syntax: %macro! (for e-prefixed macros) or %macro (for others)
| Macro | Purpose |
|---|---|
eaid | Account identifier |
eadv | Advertiser identifier |
ebuy | Buy/placement identifier |
ecid | Campaign identifier |
epid | Placement identifier |
eenv | Environment identifier |
esid | Site identifier |
edimpid | Display impression identifier |
s | Source |
u | Custom variable |
g | Group |
Adform
Section titled “Adform”Macro syntax: __MACRO_NAME__
| Macro | Purpose |
|---|---|
ADFBNRDOM | Banner 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 |
ADFADGAPID | Ad gap identifier |
ADFIMPID | Impression identifier |
ADFGDPR | GDPR applicability flag |
ADFGPPSID | GPP section identifier |
ADFREFERER | Referrer URL |
ADFORDID | Order identifier |
ADFORD | Order name |
ADFINV | Inventory name |
ADFPLAID | Placement identifier |
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 |
|---|---|
CLICK_URL | Click tracking URL |
CLICK_URL_ENC | URL-encoded click tracking URL |
PUBLISHER_ID | Publisher identifier |
AUCTION_ID | Auction identifier |
EXT_APP_ID | External app identifier |
CREATIVE_ID | Creative identifier |
REFERER_URL_ENC | URL-encoded referrer |
SITE_ID | Site identifier |
GDPR | GDPR applicability flag |
GDPR_CONSENT | GDPR consent string |
RTB House
Section titled “RTB House”Macro syntax: {MACRO_NAME}
| Macro | Purpose |
|---|---|
CAMPAIGN_NAME | Campaign name |
CREATIVE_HASH | Creative hash identifier |
IMPRESSION_HASH | Impression hash identifier |
SSP_ADVERTISER_ENCRYPTED | Encrypted SSP advertiser identifier |
REFERER_HOST_ENCRYPTED | Encrypted referrer host |
APP_ID_ENCRYPTED | Encrypted app identifier |
Amazon
Section titled “Amazon”Macro syntax: {%macro}
| Macro | Purpose |
|---|---|
ad_cfid | Ad configuration identifier |
creative_cfid | Creative configuration identifier |
campaign_cfid | Campaign configuration identifier |
short_redirect_urlEncode | URL-encoded redirect URL |
request_arid | Request identifier |
Active Agent
Section titled “Active Agent”Macro syntax: %macro%
| Macro | Purpose |
|---|---|
bannerid | Banner identifier |
profile:adslotid | Ad slot identifier |
campaignid | Campaign identifier |
orderid | Order identifier |
advertiserid | Advertiser identifier |
websiteid | Website identifier |
ssp | Supply-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).
StackAdapt
Section titled “StackAdapt”Macro syntax: {MACRO_NAME}
| Macro | Purpose |
|---|---|
SA_REF_ID | Reference identifier |
SA_BUNDLE_ID | Bundle identifier |
SA_CREATIVE_ID | Creative identifier |
SA_CAMPAIGN_ID | Campaign identifier |
SA_REF_DOMAIN | Reference domain |
SA_REF_PAGE | Reference page URL |
SA_LINE_ITEM_ID | Line item identifier |
SA_SOURCE_ID | Source identifier |
SA_ADVERTISER_ID | Advertiser identifier |
SA_PLACEMENT_ID | Placement identifier |
Remerge
Section titled “Remerge”Remerge does not use DSP-specific macros. Tags are generated with only the base fraud0 parameters.
Imprint Privacy Policy Terms & Conditions DPA