Advanced RTB option: Pocketmath Mobile DSP Ad Macros

Posted by Hannah Jeon on Jun 20, 2017 12:11:41 PM

Topics: Tips & How to

When running campaigns on Pocketmath, Campaign Managers often use ad macros to collect insightful data and information on target audiences.


Also called tokens, ad macros are instrumental in managing and optimizing a campaign’s KPI when used together with third party tracking services such as Adjust, Adways, Appsflyer, Apsalar, Kochava, and Tune. Pocketmath bidders can track, identify, and replace ads with actual audience information in real-time.


Ad macros can also be included in any code processed by the ad server during the delivery process. Examples include third-party or custom creative code, rich media code, and click-through URLs.


Listed below are the types of ad macros used by our customers for their mobile advertising campaign and supported by Pocketmath’s mobile DSP. 

(Note: The following tables cover Tracking Macros, Device-specific Macros, Device Identifier Macros, Source Macros, and Targeting Macros)


Tracking Macros

 Variables  Field Info  Example
 ${imp_id}  Pocketmath-specific  impression ID. Values  returned are in the  form of unique  alphanumeric  characters.


 ${click_url}  Pocketmath-supplied  URL used to track click-  throughs and to record  clicks in the Pocketmath  dashboard.


 Flow+Free+-+Pla y&page_url=&isp=MobileOne&as=










 ${timestamp}  UNIX timestamp of RTB  auction.


 ${datetime}  Date and time of RTB  auction formatted as  YYYY-MM-DD  HH:MM:SS.

 7/28/2015 6:20:24


A click macro is required for all Rich Media creative tags such as JavaScript, MRAID, but not necessary for Video, Static Banner and Native Ads. With a click macro, Pocketmath can track clicks on the Campaign/Order dashboard.


Device-specific Macros

 Variables  Field Info  Example
  ${device_isp}  Name of ISP. Carrier  information can be  derived from this  value.


 ${device_model}  Returns the value of  the device model.


 Returns the value of  the device operating  system.


 Device operating  system version  number.



Device Identifier Macros

 Variables  Field Info  Example
 ${device_identifier _type}  Returns the type of  device identifier that  matched the bid


 ${device_identifier}  Returns the value of  device identifier and  can be SHA1-  hashed,  depending  on type  format  provided by  the ad  exchange.


 User-agent string for  the user device.


 Device operating  system version  number.


 ${ifa}  Apple's Identifier for  advertising in raw  format.


 ${sha1_aid}  SHA1-hashed format  of Android ID.


 ${sha1_dpid}  SHA1-hashed format  of both Google  Advertising ID or  IDFA


 ${sha1_did}  SHA1-hashed format  (such as IMEI, MEID,  or  ESN).


 ${sha1_udid}  SHA1-hashed  Unique  Device ID. (A  SHA-1  hash value is  typically  rendered as  a  hexadecimal  number.)



The best way to fetch device IDs is to use the ${device_identifier_type} & ${device_identifier} macro in the same tag. It helps you identify the type of device identifier returned and its corresponding value. 


Source Macros

 Variables  Field Info  Example
 ${page_url}  The URL of the page  where  the ad  impression has  occurred. Doesn’t work  for  apps.


 ${referrer_url}  Publisher's referrer  URL to  determine the  source of  the click


 Plain text name of the  site  or app on which  the ad is  being served.



 ${bundle_id}  Application bundle or  package name from  iTunes/AppStore. Only  available for Apps.  



Targeting Macros

 Variables  Field Info  Example
 ${ad_size}  Dimension of ad  displayed.


 ${campaign_id}  Pocketmath Campaign  Identification Number.


 Creative type.


 ${ip_add}  Publisher's referrer  URL to determine the  source of the click.

 ${exchange}  Name of exchange  where impression is  won.


 ${order_id}  Order identification  number where  impression is won.


 ${lat}   Latitude from -90.0 to  +90.0, where negative  is south.


 ${lon}    Longitude from -180.0  to +180.0, where  negative is west.


  ${gps}  GPS coordinates, up to  6 decimal precision


 ${postal_code}  Zip or postal code.


 ${dnt}    Standard "Do Not  Track" macro.
 Note: If the user has  opted in to no tracking,  Pocketmath will not  disclose any personal  Identifiable  information.

 0 = tracking is allowed
 1 = do not track


Ad macros are provided on a “best effort” basis. Some bid opportunities will not contain data for specific ad macros.

For example, if the ad exchange does not send the Android ID in a bid request, invoking the ${sha1_aid} results in an empty parameter being passed.






Are you not a Pocketmath user? If you're interested, talk to us!



More stories to read.. 

Harness the power of 1st-party data integration: the key to higher advertising returns

Rules made easy

Easier results with automatically optimised CPC Targeting


Subscribe to Email Updates

Popular Posts

Recent Posts