Macros

MoPub supports the following macros for click and impression trackers. All macros are supported for both clicks and impressions unless stated otherwise in the Description column.

Macro Type Description Example
%AD_CAMPAIGN_NAME% Campaign Name Name of the ad campaign iOS Rewarded Playable US
%CAMPAIGN_ID% Campaign ID CrossInstall’s unique identifier for the campaign JwCk
%COUNTRY_CODE_LOWER% Country Code (Lower case) 2-letter ISO country code in lower case us
%COUNTRY_CODE% Country Code 2-letter ISO country code US
%DEVICE_TYPE% Device Type Device type: iphone, ipad, ipod, android ipad
%EXCHANGE% Ad Exhange Name The ad exchange name (mopub, adex, rubicon, etc) mopub
%PUBLISHER_NAME% Publisher Name Name of the publisher application where ad is served Soul.io
%PUBLISHER_STORE_ID% Publisher App Store ID App Store ID of the publisher application where ad is served 1459398714
%CLICK_ID% Click ID Click trackers only. CrossInstall’s unique identifier for the click; must be used for attribution purposes to identify the install or event on the postback URLs. The value is case-sensitive. PGqqLgw
%IMPRESSION_ID% Impression ID Unique impression ID c6aa02f0f617b0af7a458187434f7d21
%VIEW_ID% Impression ID Impression trackers only. Unique impression ID c6aa02f0f617b0af7a458187434f7d21
%AF_AD_TYPE% Ad Format Return one of the following name conventions:

- banner (whenever responseFormat is Banner)

- video (whenever the ad is a non rewarded video)

- rewarded_video (whenever the ad is a rewarded video)

- playable (whenever the ad is a playable, regardless of whether it’s rewarded or non rewarded)
playable
%CREATIVE_HEIGHT% Creative Height Height of ad creative 960
%CREATIVE_ID_ALPHA% Creative ID (non-alphanumeric) CrossInstall’s unique identifier for the ad creative with non-alphanumeric characters removed flashdivep1
%CREATIVE_ID% Creative Name CrossInstall’s unique identifier for the ad creative (passes back creative name) flash_dive_p1
%CREATIVE_TYPE% Creative Type video, playable, banner, native playable
%CREATIVE_VERSION% Creative Version (playable only) version number/hash of the creative (playable only) d9e85abc66a4c90e05000000
%CREATIVE_WIDTH% Creative Width Width of ad creative 640
%VIDEO_LENGTH% Video Length Return the total possible duration of the video in seconds (e. g. “30”) 30
%CAMPAIGN_CURRENCY% Campaign Currency (USD only) Will always pass back USD USD
%CAMPAIGN_RATE_TYPE% Campaign Rate Type Used to pass back billing type on campaign COM
%DEVICE_OS% Device Operating System Device operating system: ios, android ios
%ANDROID_AD_ID% Android Advertising ID Google Android Advertising ID as received by the exchange  
%IDFA% iOS Device ID iOS IDFA device identifier as received by the exchange B8BF3F49-BBAE-4U38-H910-ER1D9CF0B085
%IP% IP Address IP address 5.63.224.24
%IS_LAT% Latitude Return “true” if the device is a zeroidfa device; “false” otherwise false
%IS_REWARDED% Rewarded Ad Traffic Return “true” if the campaign supports rewarded traffic; “false” otherwise true
%USER_AGENT% Device’s User Agent Device’s User-Agent Mozilla%2F5.0+%28
Linux%3B+Android+
10%3B+POT-LX1+Build%
2FHUAWEIPOT-L02%3B+
wv%29+AppleWebKit%
2F537.36+%28KHTML%
2C+like+Gecko%29+
Version%2F4.0+Chrome%
2F90.0.4430.66+Mobile+
Safari%2F537.36
%LANGUAGE_LOWER% Device Language (Lower case) Device’s preferred language setting in lower case en
%LANGUAGE_UPPER% Device Language (Upper case) Device’s preferred language setting in upper case EN

Last updated July 13, 2021

TWITTER, MOPUB, and the Bird logo are trademarks of Twitter, Inc. or its affiliates. All third party logos and trademarks included are the property of their respective owners.

© 2021 MoPub (a division of Twitter, Inc.)