Client Side JavaScript Tags
Overview
Although OpenRTB is the desired implementation method, it is possible to access MobileFuse demand using client-side JavaScript tags using a standard HTML snippet. A JavaScript tag looks like the following. You should be sure to set up your ad server to replace the macros with relevant values. Please note that this tag is synchronous and requires document.write()
.
<script src="https://mfx.mobilefuse.com/js?id=000000&sizes=300x250&bundle=${BUNDLE}&ifa=${IFA}&lat=${LATITUDE}&lon=${LONGITUDE}&lltype=${LAT_LON_TYPE}&pos=${POS}&apis=${APIS}&age=${AGE}&gender=${GENDER}&schain=${SUPPLY_CHAIN}&pchain=${PAY_ID}&us_privacy=${US_PRIVACY}&gdpr=${GDPR}&gdpr_consent=${GDPR_CONSENT_909}&cb=${CACHEBUSTER}"></script>
Parameters
All parameters should be URL encoded where necessary. If you are unable to provide a parameter, you should remove it from the tag. IP and User Agent macros are not needed as the information will be detected from the headers. Items marked with an asterisk are highly recommended to maximize earning potential.
Field | Required | Description |
---|---|---|
id | Yes | MobileFuse-provided ID for this placement |
sizes | Yes | Comma-separated list of WIDTHxHEIGHT’s, eg. 320x50,300x50 |
bundle | Yes | On Android, this should be a bundle or package name (e.g., com.foo.mygame). On iOS, it should be a numeric ID. |
ifa | No* | Identifier For Advertisers (aka IDFA or AAID) |
ifv | No* | Identifier For Vendors (aka IDFV) |
lat | No* | Latitude expressed as a float |
lon | No* | Longitude expressed as a float |
lltype | No* | Lat/Lon type, ie. how was lat/lon collected?
|
pos | No | Position of ad in the viewport
|
instl | No | Whether this ad unit is within an interstitial or not
|
apis | No* | CSV of supported API frameworks for this banner. If an API is not explicitly listed, it is assumed not to be supported.
|
schain | Yes, if not a direct publisher | The serialized form of the supply chain object. Only required if the publisher’s relationship with MobileFuse is not direct. |
pchain | string | Payment ID chain string containing embedded syntax described in the TAG Payment ID Protocol v1.0. |
age | No* | Age or year of birth of user (eg. 51, 24, 1988, 1957) |
gender | No* | Gender of user. Lowercase values will work as well
|
dnt | No | Do not track (or limit ad tracking, since we treat both the same way)
|
us_privacy | No | US privacy string, required in jurisdictions where legally enforced |
gdpr | No | GDPR applies (1 or 0), required in jurisdictions where legally enforced |
gdpr_consent | No | TCF2 GDPR consent string, required in jurisdictions where legally enforced |
coppa | No | Boolean to specify if the transaction is subject to COPPA or not
|
ctx | No | Type of content (game, video, text, etc.).
|
test | No | Indicator of test mode in which auctions are not billable
|
cb | Yes | Recommended to ensure requests are not cached by client |
Passbacks
We recommend you provide an HTML passback tag when using the client side JS tag option to allow you to fill any inventory we are unable to with your other demand sources.
During account creation, please send passback tags via email to your account manager and/or PubOps@mobilefuse.com.
Note that the passback should be HTML, not JavaScript (though it can of course contain JS).
Correct:
<script>doSomething();</script>
Not Correct:
doSomething();