Macros enable you to dynamically populate values in your ad-related URLs:
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 ( For example: The |
The following tables on this page list all the supported Publica macros.
Macro | Description |
[APP_BUNDLE] | 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: |
[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_CHANNEL] | Name of the channel For example: |
[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_NAME] | 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_KEYWORDS] | Comma-separated keywords associated with the content For example: |
[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_PROD] | Type of content produced Possible values:
|
[CONTENT_PRODUCER_ID] | Unique identifier of the content producer or originator |
[CONTENT_PRODUCER_NAME] | Name of the content producer or originator For example: |
[CONTENT_RATING] | Rating of the content For example: |
[CONTENT_SEASON] | Season of the content For example: |
[%CONTENT_SERIES%] | Encoded series of the content For example: |
[%CONTENT_TITLE%] | Encoded title of the content For example: |
[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 |
[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: |
[IP] | User IP address For example: |
[%IP%] | Encoded user IP address For example: |
[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:
|
[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: |
[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 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: |
[WIDTH] | Device’s screen width (in px) For example: |
[YOB] | User’s year of birth For example: |
An incoming macro enables passing content metadata through custom key values to an SSP, but not to a bidder (DSP).
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
|
A passthrough macro enables passing publisher-defined query parameters that are not supported by other general macros such as [CUSTOM_4]
, [CUSTOM_5]
, [CUSTOM_6]
, [CUSTOM_7]
, and [CUSTOM_8].
Standard naming conventions apply to publisher-defined query parameters.
Macro | Description |
| Single instance of a publisher-defined query parameter and its value If multiple instances of the same query parameter appear within a URL, only the value of the first instance is retrieved. For example:
For the query parameters
|
[PT_{X}_{QUERY_PARAMETER}] | Single instance of a publisher-defined query parameter and its value when multiple instances of that query parameter appear in a URL The For example:
customQueryParam . The following two passthrough macros are available to capture the query parameter and values:
|
[PTC_{X}_{QUERY_PARAMETER}] | Single instance of a publisher-defined query parameter and a specific value within a list of values The For example:
customQueryParam2 that contain a total of four, comma-separated values: abc , def , qrs , and xyz . The following four passthrough macros are available to capture the values:
|
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
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