MobileFuse Macros Documentation
MobileFuse's platform allows for macros (placeholders) to replace a certain text wherever it appears in your ad code or requests. After being processed by the ad server, all the macros used will be replaced with the corresponding values (see tables below).
Click URL Placeholders
While editing 'Creative Settings' (or creating a new ad), you specify the CLICK THRU URL.
These placeholders listed in the table below are supported.
|%DID%||Replace with domain (site) ID where the ad impression occurred|
|%CPID%||Replace with a unique ID of the ad|
|%SID%||Show ID is passed through the landing page|
|%UID%||Unique user ID|
|%RANDOM%||Replace with a random number|
|%TIMESTAMP%||Replace with the Unix timestamp|
|%REFURL%||Encoded URL of web page where the ad impression occured|
|%PHONE_BRAND%||Replace with the corresponding phone brand name from WURFL|
|%PHONE_MODEL%||Replace with the corresponding phone model name from WURFL|
Using Click URL Placeholders
Now, macros from the table above are supported in your direct links (i.e. click URLs). If specified in ad requests, they will be populated with the appropriate values and users will be successfully redirected to a campaign landing page.
Just specify the required macros in your campaign click URL as it is shown below:
After backend processing, your click URL will look like this:
By adding to campaigns Click URL, parameters %CPID%, %UDID% and %DID% can be used for tracking multiple conversion.
Rich Media Placeholders
When you create a rich media ad, you can also use macros designed for rich media ads in the special text box.
This box additionally supports the following placeholders.
|%LINK%||Replace with a link (wrap URL) for tracking the click back to the destination URL|
|%ELINK%||Replace with an encoded link for tracking the click back to the destination URL|
|%WIDTH%||Replace with MMA max image width based on UA passed in the ad call.|
|%HEIGHT%||Replace with MMA max image height based on UA passed the ad call.|
|%DEVICEWIDTH%||Replace with the device screen width.|
|%DEVICEHEIGHT%||Replace with the device screen height.|
Using Rich Media Placeholders
One of the ways of using rich media macros is to specify them in your ad code. Here is an example of a rich media ad code with replaceable parameters specified:
As a result, the code of the ad after replacing macros by the corresponding values will be as follows:
Using Size MACROS
If you need to use size placeholders in your rich media, add them to your rich media tag:
As a result, you will get the following ad text:
If you like to have more than one click URL with different destinations in your ad, additionally to the %LINK% macro use the redir GET parameter (%LINK%?redir=...). In this case, the backend will just count the click (regardless of what the click url textbox) and redirect you to whatever is in redir.
NOTE: URL specified in redir must be encoded.
Placeholders Common To Rich Media And Click URL
|%COUNTRYCODE%||Replace with a country code extracted from ad call.|
|%REGIONCODE%||Replace with a region code (a state code in case of US).|
|%LATITUDE%||Replace with the latitude value of the user device (either passed in the call or auto detected by IP).|
|%LONGITUDE%||Replace with the longitude value of the user device (either passed in the call or auto detected by IP.|
|%ZIP%||Replace with zip code as entered in the ad call.|
|%DMA%||Replace with dma (metro) code as entered in the ad call using parameter ‘area’.|
Using Location MACROS in Rich Media Tags
If you want to use location placeholders in your rich media, simply specify those desired in your rich media tag:
As a result, your ad text will be as follows:
Using Location MACROS in Click URL
If you need any location placeholders to be specified in your click URL, add them to the ad call using the corresponding ad request parameters. To obtain the list of available geolocation request parameters, see MobileFuse Ad Request API.