Advanced macro glossary

AdButler supports a wide variety of macros that are useful for passing targeting information to ad networks and RTB integrations.

Macro: Used internally in AdButler when implementing tags. Macros are placed in the Custom HTML / third party script body, Destination URLs, or Tracking URLs.

Parameter: These are used by passing them to an AdButler request, either directly through the requesting URL or via a custom field in the Asynchronous JavaScript zone tag.

[ADVERTISING_ID]
[APP_BUNDLE_NAME]
[APP_DOMAIN]
[APP_NAME]
[APP_PACKAGE_NAME]
[APP_STORE_URL]
[APP_VERSION]
[CARRIER_CODE]
[CARRIER_COUNTRY]
[CARRIER_NAME]
[CONSENT]
[COPPA_COMPLIANT]
[CUSTOM_PARAM1] to [CUSTOM_PARAM5]
[DEVICE_MAKE]
[DEVICE_MODEL]
[DEVICE_TYPE]
[DO_NOT_TRACK]
[GDPR]
[IP_ADDRESS]
[LANGUAGE]
[LATITUDE]
[LAZY_LOADING_MODE]
[LONGITUDE]
[NETWORK_TYPE]
[OS_NAME]
[OS_VERSION]
[REFERRING_URL]
[SCREEN_DENSITY]
[SCREEN_HEIGHT]
[SCREEN_WIDTH]
[USER_AGE]
[USER_AGENT]
[USER_GENDER]
[USER_YEAR_OF_BIRTH]
[US_PRIVACY]
[ZONE_ABOVE_THE_FOLD]


Advertising ID

Fills in the device's Advertising ID.

Macros Parameter Example
[ADVERTISING_ID] [ADVERTISING_ID_ENCODED] aduid 96bd03b6-defc-4203-83d3-dc1c730801f7

Application Bundle / Package Name

Fills in the application's bundle name or package name (depending on the device/OS).

Macros Parameter Example
[APP_BUNDLE_NAME] [APP_BUNDLE_NAME_ENCODED] [APP_PACKAGE_NAME] [APP_PACKAGE_NAME_ENCODED] appcode com.package.mypackage

App Domain

Fills in the app's domain; used with the AdButler mobile SDK.

Macro Parameter Example
[APP_DOMAIN] [APP_DOMAIN_ENCODED] Sent by the SDK; can be manually overriden using appdomain https://www.adbutler.com

Application Name

Fills in the application's name.

Macros Parameter Example
[APP_NAME] [APP_NAME_ENCODED] appname Google Play Music

App Store URL

Fills in the URL to the app's page in the Google Play or Apple App store.

Macros Parameter Example
[APP_STORE_URL] [APP_STORE_URL_ENCODED] storeurl https://play.google.com/store/apps/details?id=sample_app

App Version

Fills in the app's version number; used with the AdButler mobile SDK.

Macro Parameter Example
[APP_VERSION] [APP_VERSION_ENCODED] Sent by the SDK; can be manually overriden using appversion 1.0.0

Carrier Code

Fills in the code of the device's SIM's operator.

Macro Parameter Example
[CARRIER_CODE] carriercode 412 20

Carrier Country

Fills in the country code of the device's SIM's operator.

Macros Parameter Example
[CARRIER_COUNTRY] [CARRIER_COUNTRY_ENCODED] carriercountry CA

Carrier Name

Fills in the name of the device's SIM's operator.

Macros Parameter Example
[CARRIER_NAME] [CARRIER_NAME_ENCODED] carrier Bell Networks

Fills in the TCF-compliant GDPR consent string.

Macro Parameter Example
[CONSENT] gdpr_consent_string BOeLqXmOeLqXmAtABBENCL-AAAAmB7_______9______5uz_Ov_v_f__33e8__9v_l_7_-__u-33d4-_1vf99yfm1-7ftr3tp_87ues2_Xur__59__3z3_9phPrsks9Kg

COPPA Compliance

A flag that indicates if the app is COPPA-compliant.

Macro Parameter Example
[COPPA_COMPLIANT] coppa 1

Custom Parameter

Lets you add and fill in your own parameter. You can have up to five custom parameters.

Macros Parameter Example
[CUSTOM_PARAM1] to [CUSTOM_PARAM5] customParam1 to customParam5 xmaspromo23

Device Make

Fills in the device manufacturer.

Macros Parameter Example
[DEVICE_MAKE] [DEVICE_MAKE_ENCODED] dvmake Samsung

Device Model

Fills in the model number.

Macros Parameter Example
[DEVICE_MODEL] [DEVICE_MODEL_ENCODED] dvmodel SM-A520W

Device Type

Fills in the device type if applicable.

Macros Parameter Example
[DEVICE_TYPE] [DEVICE_TYPE_ENCODED] dvtype phone/tablet

Do Not Track

A flag that indicates whether the user's data should be tracked or not (1 = enabled, 0 = disabled).

Macro Parameter Example
[DO_NOT_TRACK] dnt 0

GDPR Applies

A flag that indicates whether GDPR applies to the user or not (1 = yes, 0 = no, Empty = unknown).

Macro Parameter Example
[GDPR] gdpr_applies 1

IP Address

Fills in the user's IP address.

Macro Parameter Example
[IP_ADDRESS] [IP_ADDRESS_ENCODED] Set by the user's IP address; can be manually overriden using ip 192.111.222.333

Language

Fills in the user's language setting.

Macros Parameter Example
[LANGUAGE] [LANGUAGE_ENCODED] lang en_CA

Latitude

Fills in the device's current latitude.

Macro Parameter Example
[LATITUDE] lat 48.424497

Lazy Loading Mode

Sets the lazy loading mode: auto, eager, or lazy. This macro maps directly to the value of the loading attribute on images or iframes.

It works in conjunction with the [ZONE_ABOVE_THE_FOLD] macro's input parameter, atf. When set to auto, then lazy loading method is determined by the value of atf, where atf=0 sets loading to lazy and atf=1 sets loading to eager.

Macros Parameter Example
[LAZY_LOADING_MODE] llmode auto

Longitude

Fills in the device's current longitude.

Macro Parameter Example
[LONGITUDE] long -123.369506

Network Connection Type

Fills in the device's current connection type: WIFI, 2G, 3G, or 4G.

Macro Parameter Example
[NETWORK_TYPE] network WIFI

Operating System

Fills in the name of the device's operating system.

Macros Parameter Example
[OS_NAME] [OS_NAME_ENCODED] os Android

Operating System Version

Fills in the version number of the device's operating system.

Macros Parameter Example
[OS_VERSION] [OS_VERSION_ENCODED] osv 7.0.0

Referring URL

Fills in the website's URL, or at least its domain.

Macros Parameter Example
[REFERRING_URL] [REFERRING_URL_ENCODED] Set by the browser's referrer header; can be manually overriden using referrer https://www.adbutler.com/help

Device Screen Density

Fills in the pixel density of the device's screen.

Macro Parameter Example
[SCREEN_DENSITY] spr 3

Device Screen Height

Fills in the height of the device's screen (absolute, in pixels).

Macro Parameter Example
[SCREEN_HEIGHT] sh 640

Device Screen Width

Fills in the width of the device's screen (absolute, in pixels).

Macro Parameter Example
[SCREEN_WIDTH] sw 360

User Age

Fills in the user's age in years.

Macro Parameter Example
[USER_AGE] age 24

User Agent

Fills in the browser's user agent string.

Macros Parameter Example
[USER_AGENT] [USER_AGENT_ENCODED] Set by the browser's user agent request header, can be manually overriden using ua Mozilla/5.0 (platform; rv:geckoversion) Gecko/geckotrail Firefox/firefoxversion

User Gender

Fills in the user's gender (male or female).

Macro Parameter Example
[USER_GENDER] gender female

User Year of Birth

Fills in the user's year of birth.

Macro Parameter Example
[USER_YEAR_OF_BIRTH] yob 1993

US Privacy (CCPA)

Fills in the string that indicates the user's privacy selection under CCPA.

Macro Parameter Example
[US_PRIVACY] us_privacy 1YNN

Zone Above the Fold

Sets the value of the [LAZY_LOADING_MODE] macro's input parameter, llmode, when lazy loading is set to auto. Possible values are 0 or 1.

A value of 0 indicates that the zone is below the fold (i.e. below the visible area of the page), while a value of 1 indicates that the zone is above the fold (i.e. within the visible area of the page).

Macros Parameter Example
[ZONE_ABOVE_THE_FOLD] atf 0

Can't find what you're looking for?

Send us an email

hello@adbutler.com

Visit the blog

For more ad serving tips, industry news and AdButler insights.