• Javascript code installation

    Mobile and adaptive websites

    • Get your Ad Space ID (SITE_ID) on the "Receive Code" page of the plus1.wapstart.co website or contact our Client Services to get it.
    • Place the container code into the body of the page in those places where it is planned to serve ads. The container code is:
      <div class="wapstart-plus1-ad"></div>
    • Insert your SITE_ID in following code and place it at the end of each page where you want the ads to be displayed. Javascript code:
      <script>
      (function(){
      var plus1SiteId = SITE_ID;
      
      var c = document.createElement('script'); c.type = 'text/javascript'; c.async = true; 
      c.src = '//api.plus1.wapstart.co/v1/ads/sc/' + plus1SiteId + '.js'; 
      var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(c, s);
      })();
      </script>

    Desktop websites

    • Get your Ad Space ID (SITE_ID) on the "Receive Code" page of the plus1.wapstart.co website or contact our Client Services to get it.
    • Place the container code into the body of the page in those places where it is planned to serve ads. The container code is:
      <div class="wapstart-plus1-ad" data-banner-ext-style="2"></div>
    • Insert your SITE_ID in following code and place it at the end of each page where you want the ads to be displayed. Javascript code:
      <script>
      (function(){
      var plus1SiteId = SITE_ID;
      
      var c = document.createElement('script'); c.type = 'text/javascript'; c.async = true; 
      c.src = '//api.plus1.wapstart.co/v1/ads/sc/' + plus1SiteId + '.js'; 
      var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(c, s);
      })();
      </script>

    Data passing


    We accept information about user's age and gender, geo-data and other parameters. All available parameters can be found in „Ad request“ object description.

    All available parameters should be added as attribute of the container.
    The attribute name consist of the „data-“ prefix and property names in a nested object hierarchy. For example, to pass user's gender, use:

    	data-user-gender="1"

    geo-data:
    	data-device-geo-lon="99"
    	data-device-geo-lat="99"

    As a result, banner's container will be the following:
    <div 
    	class="wapstart-plus1-ad" 
    	data-user-gender="1"
    	data-device-geo-lon="99"
    	data-device-geo-lat="99"
    ></div>


    View settings


    Display modifications are available for each container by adding attributes to it.
    Currently available:

    • data-banner-ext-customization-disableshield="1" — turn off the label
    • data-banner-ext-customization-disableborder="1" — turn off the frame of ad
    • data-banner-ext-customization-disablebg="1" — turn off background and make it transparent

    Next attributes are available only for desktop websites:

    • data-banner-ext-customization-floatingbg="black" — dark gradient for filler (by deafault)
      data-banner-ext-customization-floatingbg="white" — light gradient for filler
    • data-banner-ext-customization-showposition="top" — place Ad on the top of the page (by default)
      data-banner-ext-customization-showposition="bottom" — place Ad on the bottom of the page

    Example: how to create a container for the desktop website, without label, with a transparent background, dark gradient-filler and bottom position of the container on the page:

    <div 
    	class="wapstart-plus1-ad"
    	data-banner-ext-style="2" 
    	data-banner-ext-customization-showposition="bottom"
    	data-banner-ext-customization-floatingbg="black"
    	data-banner-ext-customization-disableshield="1"
    	data-banner-ext-customization-disablebg="1"
    ></div>

    Important: some modifications are only available after approved by your account manager.


    Examples


    Standard banner for mobile sites

    Installation code:

    <div class="wapstart-plus1-ad"></div>
    <script>
    (function(){
    var plus1SiteId = SITE_ID;
    
    var c = document.createElement('script'); c.type = 'text/javascript'; c.async = true; 
    c.src = '//api.plus1.wapstart.co/v1/ads/sc/' + plus1SiteId + '.js'; 
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(c, s);
    })();
    </script>

    Standard banner for desktop sites

    Installation code:

    <div 
    	class="wapstart-plus1-ad"
    	data-banner-ext-style="2"
    ></div>
    <script>
    (function(){
    var plus1SiteId = SITE_ID;
    
    var c = document.createElement('script'); c.type = 'text/javascript'; c.async = true; 
    c.src = '//api.plus1.wapstart.co/v1/ads/sc/' + plus1SiteId + '.js'; 
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(c, s);
    })();
    </script>

    Custom banner for mobile sites

    Installation code:

    <div 
    	class="wapstart-plus1-ad"
    	data-banner-ext-style="3"
    ></div>
    <script>
    (function(){
    var plus1SiteId = SITE_ID;
    
    var c = document.createElement('script'); c.type = 'text/javascript'; c.async = true; 
    c.src = '//api.plus1.wapstart.co/v1/ads/sc/' + plus1SiteId + '.js'; 
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(c, s);
    })();
    </script>