Supported Macros Reference
Overview
Macros enable you to dynamically populate values in your ad-related URLs:
- VAST tags for direct campaigns
- Brand safety tracking URLs
- Custom key-value pair values
- VAST tag bidder setups
Using macros eliminates the likelihood that a value is mistyped.
If a macro value could potentially contain spaces, the value should be encoded to prevent the URL from breaking. A macro's value can be encoded by wrapping the macro with percentage signs ([%MACRO%]
).
For example:
The [APP_NAME]
macro value may contain spaces such as My Awesome App
. To encode the macro value, use [%APP_NAME%]
instead of [APP_NAME]
. The macro value will be encoded as: My%20Awesome%20App
.
The following tables on this page list all the supported Publica macros.
General Macros
Macro | Description |
[APP_BUNDLE] | Bundle ID of the app based on the value passed in the For example: |
[%APP_BUNDLE%] | Encoded Bundle ID of the app based on the value passed in the For example: |
[APP_DOMAIN] | Unique identifier for the app domain For example: |
[APP_NAME] | Name of the app based on the value passed in the For example: |
[%APP_NAME%] | Encoded name of the app For example: |
[APP_STORE_URL] | App store URL For example: |
[%APP_STORE_URL%] | Encoded app store URL For example: |
[BUYERUID] | Buyer UID For example: |
[CACHEBUSTER] | Random number For example: |
[CHANNEL_LABEL_ID] | Comma-separated list of the channel label internal IDs in the channel settings For example: |
[CONSENT] | GDPR consent string This dimension is based on the value passed in the For example: |
[CONTENT_CAT] | Comma-separated list of IAB Categories See: OpenRTB, Section 5.1 For example: |
[%CONTENT_CAT%] | Encoded version of Comma-separated list of IAB Categories See: OpenRTB, Section 5.1 For example: |
[CONTENT_CHANNEL] | Name of the channel For example: |
[%CONTENT_CHANNEL%] | Encoded name of the channel For example: Publica+TV |
[CONTENT_CONTEXT] | Type of content being used of consumed by the user in which an ad impression will appear Possible values:
|
[CONTENT_DIST_ID] | Unique identifier of the content distributor |
[%CONTENT_DIST_ID%] | Encoded version of unique identifier of the content distributor |
[CONTENT_DIST_NAME] | Content distributor name |
[%CONTENT_DIST_NAME%] | Encoded version of content distributor name |
[CONTENT_EPISODE] | Number of the episode For example: |
[%CONTENT_GENRE%] | Encoded genre of the content For example: |
[CONTENT_ID] | Unique identifier of the content For example: |
[%CONTENT_ID%] | Unique identifier of the content For example: |
[CONTENT_KEYWORDS] | Comma-separated keywords associated with the content For example: |
[%CONTENT_KEYWORDS%] | Encoded version of comma-separated keywords associated with the content For example: tvshow%2Ccomedy |
[CONTENT_LANGUAGE] | Content language using ISO-639-1-alpha-2 For example: |
[CONTENT_LENGTH] | Length of content in seconds For example: |
[CONTENT_NETWORK] | Network name of the content |
[%CONTENT_NETWORK%] | Encoded version of network name of the content |
[CONTENT_PROD] | Type of content produced Possible values:
|
[CONTENT_PRODUCER_ID] | Unique identifier of the content producer or originator |
[%CONTENT_PRODUCER_ID%] | Encoded version of the unique identifier of the content producer or originator |
[CONTENT_PRODUCER_NAME] | Encoded version of the name of the content producer or originator For example: |
[%CONTENT_PRODUCER_NAME%] | Encoded version of the name of the content producer or originator For example: Warner+Bros |
[CONTENT_RATING] | Rating of the content For example: |
[%CONTENT_RATING%] | Encoded version of the rating of the content For example: |
[CONTENT_SEASON] | Season of the content For example: |
[%CONTENT_SEASON%] | Encoded version of the season of the content For example: Season+3 |
[%CONTENT_SERIES%] | Encoded series of the content For example: |
[%CONTENT_TITLE%] | Encoded title of the content For example: |
[CONTENT_URL] | URL of the content, for buy-side contextualization or review sweetseries.com/show |
[%CONTENT_URL%] | URL of the content, for buy-side contextualization or review sweetseries.com%2Fshow |
[COPPA] | Indicates if the request is protected by the Children's Online Privacy Protection Act Possible values:
|
[COUNTRY] | Three-letter country code of the user For example: |
[CUSTOM_4] - | Additional targeting parameters used to pass partner-specific information not captured by any other targeting parameter For example: |
[CUSTOM_TARGETING] | Returns the value in the custom_targeting parameter of the Publica endpoint. |
[DEVICE_LANGUAGE] | Device language For example: |
[DEVICE_MAKE] | Device make For example: |
[%DEVICE_MAKE%] | Encoded device make For example: |
[DEVICE_MODEL] | Device model For example: |
[%DEVICE_MODEL%] | Encoded device model For example: |
[DEVICE_OS] | Device operating system For example: |
[DEVICE_OS_VERSION] | Device operating system version For example: |
[DEVICE_TYPE] | Device type For example: |
[%DEVICE_TYPE%] | Encoded device type For example: |
[DID] | User device ID In Publica, For example: |
[DMA_CODE] | (US only) Nielsen three-digital DMA code For example: |
[DNT] | |
[GDPR] | Indicates GDPR acceptance This dimension is based on the value passed in the Possible values:
|
[GENDER] | Gender Possible values:
|
[GENRE_ID] | Gender ID |
[GPP] | GPP consent string For example: |
[GPP_SID] | Array of Section ID integers For example: |
[HEIGHT] | Device’s screen height (in px) For example: |
[HOUSE_ADS] | Indicator of whether or not house ads are included This macro returns the value in the Possible values:
|
[IFA_TYPE] | Device ID type For example: |
[IMPMULTIPLY] | Multiplier applied to an impression that accounts for several people watching the same digital out-of-home screen at the same time For example: |
[IP] | User IP address For example: |
[%IP%] | Encoded user IP address For example: |
[IRIS_ID] | Iris ID For example: iris_18719437 |
[IRIS_CONTEXT] | Iris Context For example: ic_0755895, ic_4890138 |
[LAT] | Latitude from -90.0 to +90.0, where negative is south For example: 40.7128 |
[LIMITED_AD_TRACKING] | Indicates if a user has activated Limited Ad Tracking (LAT) or opted out of targeted advertising This dimension is based on the value passed in the Possible values:
|
[LIVESTREAM] | Indicator of whether or not content is livestream enabled Possible values:
|
[LON] | Longitude from -180.0 to +180.0, where negative is west For example: -74.0060 |
[MAX_AD_DURATION] | Maximum length of an ad in seconds This value should be smaller than the pod duration. For example: |
[MAXBITRATE] | Maximum allowed average kilobits per second For example: |
[MIN_AD_DURATION] | Minimum length of an ad in seconds For example: |
[MINBITRATE] | Minimum allowed average kilobits per second For example: |
[%PAGE_URL%] | Encoded page URL For example: |
[POD_DURATION] | Length of the ad pod in seconds For example: |
[POSITION] | Position For example: |
[POSITIONTYPE] | Descriptor identifying whether the media console is in a fixed or moving environment Possible values:
|
[PREFERRED_LANGUAGE] | Preferred language For example: |
[RIGHTS_HOLDER] | Rights holder |
[SCHAIN] | SCHAIN string value For example: |
[SESSION_ID] | Unique identifier for the session For example: |
[SITE_ID] | Unique identifier for the channel For example: |
[SITE_NAME] | Returns the value in the site_name param |
[SLOT_COUNT] | Number of ad slots to fill for a pod For example: |
[SSAI_ENABLED] | SSAI enabled For example: |
[SSAI_VENDOR] | SSAI vendor |
[TARGETED_DEVICE] | Targeted device For example: |
[TIMESTAMP] | Unix timestamp (nanoseconds) For example: |
[TIMESTAMP_MS] | Unix timestamp (milliseconds) For example: |
[TIMESTAMP_S] | Unix timestamp (seconds) For example: |
[%UA%] | Encoded user agent For example: |
[US_PRIVACY] | US Privacy string for CCPA compliance This macro returns the value passed in the For example: |
[VENUEID] | ID or name of the venue For example: |
[VENUETYPEID] | Type of venue defined by an integer For example: |
[WIDTH] | Device’s screen width (in px) For example: |
[YOB] | User’s year of birth For example: |
Campaign Macros
An incoming macro invokes the original parameter value prior to any overrides set in the UI. One use case is the passing of content metadata through custom key values to an SSP, different from what would be present in the standard content object.
Macro | Description |
| Unique identifier of the advertiser for the linked campaign order |
| Unique identifier of the creative |
[CREATIVE_NAME] | Name of the creative (media file or vast tag) delivered |
[LINE_ITEM_ID] | Unique identifier of the line item |
[LINE_ITEM_NAME] | Name of the line item |
| Unique identifier of the direct campaign order linked to the line item served |
Incoming Macros
An incoming macro invokes the original content parameter value prior to any overrides set in the UI. One use case is the passing of content metadata through custom key values to an SSP, different from what would be present in the standard content object.
Macro | Description |
| Content metadata passed through custom key values to an SSP Generally, key-value pairs are inserted into an This macro should be used when a rule has been set that overrides or omits the value from a supported parameter. For example:
For the query parameter
This value is returned through
|
Post Bid Macros
A post bid macro is a placeholder that can be dynamically populated at the end of the Publica auction.
Macro | Description |
| Length in seconds of the winning creative This macro is currently only supported for direct campaigns and brand safety event trackers. For example: |
[DEMAND_SOURCE] | Post-auction value to identify demand partner of the won impression For example: |
[TRACKERUUID] | Unique ID generated for impression events For example: |
Table of Contents
© 2022 Publica LLC ®, All Rights Reserved.
76 Roosevelt Circle • Palo Alto, CA 94306 USA
Contact Us • Terms of Use • Privacy Policy