View file ads/adiquity.php

File size: 1.53Kb
<!-- Please paste the below code in your body of your HTML wherever you want to display AdIQuity ads in your page. If you want to display AdIQuity ads at multiple places on the same page, Please make sure you use unique div ids from the below code. For Ex: my-ad-slot-top, my-ad-slot-bottom. Do not forget to replace all values of div ids everywhere. -->
<div id = 'my-ad-slot'></div>
<script type='text/javascript' src='http://us-ads.adiquity.com/scripts/adiquity.js'></script>
<script type='text/javascript'>

    /*
    * Configuration Parameters
    *
        pazid: 'pazid',
        app: 'app',
        hwid: 'hwid',
        hwid_md5: 'hwid_md5',
        hwid_sha1: 'hwid_sha1',
        odin: 'odin',
        plat: 'plat',
        app_pkg: 'app_pkg',
        app_name: 'app_name',
        adunit: 'adunit',
        dob: 'dob',
        age: 'age',
        gender: gender',
        loc: 'loc',
        zip: 'zip',
        city: 'city',
        state: 'state',
        tags: 'tags',
        test: 'test',
    *
    */
    var adiquity_conf = {
        pazid : 'adq5akn2-14eml1mj-7c6tv',
        test: false,

        //Below Callback method gets triggered when Adiquity is not returning any ad.
        onAdsNotAvailable: function() {
            document.getElementById('my-ad-slot').style.display = 'none';
            //Please have your own logic to handle this case.
        }
    };

try {
    _adiquity.getAd(document.getElementById('my-ad-slot'), adiquity_conf);
} catch (err) { 
//Please use this block to catch exception (only incase of errors)
}
</script>