A macro is a placeholder that gets replaced with specific characters depending on the context.
Macros help to transition information from the Adform system into ads, third-party systems (through impressions or click trackers), or to an advertiser's page. Macros can provide information to identify or categorize ad delivery, actual impressions (or clicks), or visits to an advertiser's landing page.
Note
Some macros may transmit identifiers or other user-related values to third-party systems. Clients should ensure that the use of such macros is consistent with applicable privacy laws, contractual obligations, and any required user consent or other applicable privacy signals before transmitting user-level identifiers.
Adform macros can be used in:
-
Impression tracking pixels
-
Click tracking pixels
-
Tracking scripts
-
Landing page URLs (click URLs)
-
Third-party banners
Adform doesn't support macros in impression trackers, or external (JS) scripts for native ads tags. Measurement with third-party solutions for native ads is supported, for example, see the solution by DoubleVerify.
Ad-Serving Macros
Adform provides a range of macros specifically for ad-serving situations. The description for each includes any qualifiers.
Important
All macros encode replaced values. You can use %% (double percent) as a separator instead of __ (double underscore). (For example, macros __ADFTAGID__ and %%ADFTAGID%% are equivalent). However, using __ avoids problems with URL encodings and other interactions.
|
Macro |
Description |
||
|---|---|---|---|
|
Category: Advertiser |
|||
|
|
Advertiser name |
||
|
|
Advertiser ID |
||
|
Category: Banner |
|||
|
|
Name of a banner group number x (x=1 to 5) In the Banners section, you can Manage Banner Groups (to identify and group banners by specific features). The banner attributes can be organized into 5 groups. The macro passes the value from 1 to 5 depending on the banner group. |
||
|
|
ID of a banner group number x (x=1 to 5) |
||
|
|
Creative banner name |
||
|
|
Creative banner ID |
||
|
|
Creative banner dimensions as width x height in pixels (for example, 300x250) |
||
|
|
Creative banner height in pixels |
||
|
|
Creative banner type The value depends on the banner: Unknown, Mixed (for rotators with multiple types), Image, Link, TextLink, Keyword, RichMedia, Facebook, Synchronized, InStream, ThirdParty, Html, or NativeAd. |
||
|
|
Creative banner width in pixels |
||
|
|
AdMessage ID (only for simple Dynamic Ads) |
||
|
Category: Campaign |
|||
|
|
Campaign name |
||
|
|
Campaign ID |
||
|
|
Campaign label number x (x=1 to 20) |
||
|
Category: Inventory |
|||
|
|
The domain where the banner was shown (except in-stream ads) This is the web page's URL with the domain and any subdomains. |
||
|
|
Inventory source name (only available for ads served with RTB) |
||
|
|
Inventory source ID (only available for ads served with RTB) |
||
|
|
RTB domain (only available for ads served with RTB) This macro provides only the domain where the ad was shown. |
||
|
|
Full page URL from the bid request (URL-encoded) |
||
|
Category: Inventory (Mobile App) |
|||
|
|
Application data (only available for ads served with RTB that triggered a mobile app download) |
||
|
|
External publisher ID (only available for ads served with RTB that triggered a mobile app download) |
||
|
|
Mobile app bundle ID (only available for ads served with RTB in an mobile app environment) |
||
|
|
Mobile application name (only available for ads served with RTB in an mobile app environment) |
||
|
Category: Inventory (Placement/Line Item) |
|||
|
|
Placement name |
||
|
|
Placement ID (same as line item ID) |
||
|
|
Placement section name |
||
|
|
Placement label number x (x=1 to 20) at line item level |
||
|
Category: Inventory (PMP) |
|||
|
|
Deal ID (only available for ads served with RTB in an mobile app environment) |
||
|
Category: Landing Page |
|||
|
|
Encoded landing page URL (only for landing page or click URLs and for click-tracking pixels) |
||
|
|
Third-Party Click ID (TPC ID) Replace the asterisk (
|
||
|
Category: Line Item |
|||
|
|
Line item AdGapID (only Buy Side) This is a custom field to have a unique tracking and measurement ID for discovering discrepancies between different ad servers. It's used to compare advertiser and publisher reports by sharing a unique ID per line item with the publisher. |
||
|
Category: Media |
|||
|
|
Media name (only available for DSP and Publisher Ad Server) |
||
|
|
Media ID (only available for DSP and Publisher Ad Server) |
||
|
|
Media network name (only available for DSP and Publisher Ad Server) |
||
|
|
Media network ID (only available for DSP and Publisher Ad Server) |
||
|
Category: Order |
|||
|
|
Order name |
||
|
|
Order ID |
||
|
Category: Tag |
|||
|
|
Adform tag ID (only available for DSP and Publisher Ad Server) This is the ID of the 3rd-party tag served or viewed with Adform DSP or Ad Server. Adform assigns a banner number ID to every tag created. |
||
|
|
Adform tag name (only available for DSP and Publisher Ad Server) |
||
|
Category: Technical |
|||
|
|
First-Party ID Allows ad tags to pass Extended ID (EID) values to redirect URLs, tracking pixels, and clicks. It's replaced with the matching Extended ID value (encrypted, if available) from <source>. NoteMatching for <source> isn't case-sensitive. |
||
|
|
Impression ID This is a unique identifier for the impression event. It is generated randomly, but will be the same for all transactions after the impression. (For example, 'clicks unload' and 'events' have the same value as the impression that generated them.) This is useful for correlating these transactions. |
||
|
|
A custom macro that maps to adfm_<pattern> query parameters This is supported for all handlers: display impressions, video ads, mobile ADF scripts, and clicks. The number of custom macros and the length of the pattern is not validated, so keep the number of custom macros and length of the pattern short due to browsers' URL length limitations. |
||
|
|
Inserts a query string value separator ? or &. (only for a tag destination URL append) If the original redirect URL has a ?, it is replaced with &; otherwise, it replaces with a ?. The macro must be the first symbol in the append. (Adform supports only one macro per append.) |
||
|
|
Comscore-specific replace (‘https://sb’ or ‘http://b’) |
||
|
|
Unix timestamp in milliseconds This is used to add a cache buster to create a unique URL. |
||
|
|
Random number This is used to add a cache buster to create a unique URL. |
||
|
|
Site tracking setup ID (only available for DSP and Publisher Ad Server) It represents the Tracking ID available in the Site Tracking page in Adform. |
||
|
|
Exchange-specific publisher ID |
||
|
|
SSP partner ID |
||
|
Category: User Consent |
|||
|
|
GDPR opt-out status This relates to the GDPR overlay with 1 = opted out; 0 = opted in. |
||
|
|
GDPR flag according to IAB TCF Indicates whether GDPR applies with values with 1 = GDPR applies; 0 = GDPR doesn't apply. |
||
|
|
GPP Section ID which Adform uses for privacy resolution. As the GPP String may encode user preferences for multiple jurisdictions, this field indicates which section of the string is applicable. Possible values: 2 = EU TCF v. 2 7 = US MSPA |
||
|
|
User's Consent string according to IAB Global Privacy Platform (GPP) |
||
|
|
Consent DaisyBit information according to IAB TCF |
||
|
Category: User Context |
|||
|
|
Adform user ID (cookie ID) |
||
|
|
Referrer URL (uses the page's URL truncated to 400 characters) |
||
|
|
Mobile advertising ID (IDFA or AAID) |
||
|
|
Latitude of the viewer's location |
||
|
|
Longitude of the viewer's location |
||
|
|
City of the viewer's location |
||
|
|
Country of the viewer's location |
||
|
|
Region of the viewer's location |
||
Samsung Ads Tracking Macros
If you run your ads on Samsung Ads platform, include the macro expubID=Samsungads to track your results and get accurate reports.
Adform provides a list of macros that you can append to Samsung ads:
|
Macro |
Description |
|---|---|
|
|
Random number This is used to prevent caching and ensure unique tracking. |
|
|
User's IP address |
|
|
Campaign ID |
|
|
Flight ID |
|
|
Creative banner ID |
|
|
Device ID |
|
|
Timestamp This is used to prevent caching and to create a unique URL. |
|
|
App bundle ID This is used to identify the app where the ad was served. |
Important
Due to data restrictions, Samsung Ads are unable to accept Adform trackers and tags if you have Master Data services enabled.