<ins> is the place holder for the ad. Set all the required attributes within <ins> tag.
1 |
<ins class="adsbyvmax" id="unique_ad_1" data-adspot-key="test1234" data-refresh-after=”5” ></ins> |
<script> tag makes the ad request. It need to be placed in the head of the page.
1 |
<script type="text/javascript" src="http://cdn.vmax.com/tia/js/app.js"></script> |
Requesting Ad
1 2 3 4 5 6 7 |
<script> VMAX.showAd(“unique_ad_1”); VMAX.onAdError = function(adplacement, errorStatus){}; </script> |
Resuming Ad Rendering
1 |
VMAX.resumeAd(); |
Required privilege:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
<access origin="*" subdomains="true"></access> <tizen:privilege name="http://tizen.org/privilege/application.info"/> <tizen:privilege name="http://tizen.org/privilege/package.info"/> <tizen:privilege name="http://tizen.org/privilege/setting"/> <tizen:privilege name="http://tizen.org/privilege/internet"/> <tizen:privilege name="http://tizen.org/privilege/system"/> <tizen:privilege name="http://tizen.org/privilege/telephony"/> <tizen:privilege name="http://tizen.org/privilege/application.launch"/> |
Optional privilege:
1 2 3 |
<feature name="http://tizen.org/feature/location.gps"/> <tizen:privilege name="http://tizen.org/privilege/location"/> |
Attributes that can be set under <ins> tag
Attributes for <ins> | Values |
id | Any unique string, without space, for the page |
data-adspot-key | Adspot key. You can find either in step 3 or in adspot listing page under ID: |
data-all-campaigns | 0 – Only telco targeted campaigns will be delivered 1 – All campaigns will be delivered if set to 1 |
style | To be used to apply style / css for ad placement block
Eg: text-decoration: none; |
data-setSection | Section of site.
Eg: Headline, Article, Breaking News, Cart, Wishlist |
data-setLanguageOfArticle | Language code in ISO |
data-setLoginId | Login id of User |
data-setAge | Age of user |
data-setEmail | Email address of user |
data-setCity | Current city of user |
data-setGender | Gender of user |
data-setCustomData | Custom data in key/value pair JSON format.
Eg: ‘{“key1”: “Some key value to be sent”, “key2”: “Some key2 value to be sent”}’ |
Available Callbacks
Callbacks | Ad Formats |
onAdError(<UNIQUE_PLACEMENT_ID>, errorString) | All |
onAdClick() | All Video Ads |
onAdClose(UNIQUE_PLACEMENT_ID>) | All Video Ads |
onAdMediaStart(UNIQUE_PLACEMENT_ID>) | All Video Ads |
onAdMediaEnd(boolean, reward) | All Video Ads |
onAdMediaExpand() | Pre Roll video |
onAdMediaCollapse() | Pre Roll video |
onAdSkippable() | Pre Roll video |