MobileFuse Macros Documentation


 

 

 

 

 

 

 

 

 

 

Overview


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).

 

All MobileFuse macros can be divided into three groups: Click URL Placeholders, Rich Media Placeholders and Placeholders Common To Rich Media and Click URL.

 

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.

 

Placeholder Description
%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:

http://test.domain.com/?sid=%SID%&cid=%CPID%&did=%DID%

 

After backend processing, your click URL will look like this:

http://test.domain.com/?sid=a73cc290-20fc-11e1-ac3b-0019b9f99000&cid=13243&did=4596

 

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.

Placeholders Description
%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:

 

<iframe src="http://geo.ipromote.com/ad/?typ=1&pub=1&nid=1366&site=6885&adfmt=11&zip&сlick=%ELINK%" width="300" height="50" marginwidth="0" marginheight="0" frameborder="0" scrolling="no">
</iframe>

 

As a result, the code of the ad after replacing macros by the corresponding values will be as follows:

<iframe src="http://geo.ipromote.com/ad/?typ=1&pub=1&nid=1366&site=6885&adfmt=11&zip&click=http%3A%2F%2Fads2.MobileFuse.mobi%2Fredir%2F2620ee70-aba9-11e0-97e1-001ec9fd3a50%2F0%2F59007" width="300" height="50" marginwidth="0" marginheight="0" frameborder="0" scrolling="no">
</iframe>


Using Size MACROS

If you need to use size placeholders in your rich media, add them to your rich media tag:

 

<a href="hello.html">%DEVICEWIDTH% %DEVICEHEIGHT%, %WIDTH% %HEIGHT%</a>

 

As a result, you will get the following ad text:

<a href="hello.html">800 600, 320 50</a>


Custom Redirection

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.

 

Example,

<a href="%LINK%?redir=http%3A%2F%2Fdomain1.com%2Flink1">Click Link 1</a>
<a href="%LINK%?redir=http%3A%2F%2Fdomain2.com%2Flink2">Click Link 2</a>


 

Placeholders Common To Rich Media And Click URL


Placeholder Description
%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:

 

<a href="%LINK%">Test code macro %COUNTRYCODE%, %REGIONCODE%, %LATITUDE%, %LONGITUDE%, %ZIP%, %DMA%</a>

 

As a result, your ad text will be as follows:

Test code macro RU, 75, 56.5, 84.966705, 10013, 702


 

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.

 

www.mojiva.com/?country=%COUNTRYCODE%&region=%REGIONCODE%&lat=%LATITUDE%&long=%LONGITUDE%&zip=%ZIP%&dma=%DMA%