How to Implement ADsafe

There are a few general guidelines and steps for wrapping third-party code, and thus adding in the protective checks, in the ADsafe container.

Our first task is to attach the ADsafe JavaScript library file into the page. This file can either link directly to a hosted version that is available in the Github ADsafe project (adsafe.js in https://github.com/douglascrockford/ADsafe), or it can be a local copy if you prefer:

<script src="http://www.ADsafe.org/adsafe.js"></script>

Once the script include is in place, we can make requests to create a new ADsafe object, encapsulating the application code from the third-party source:

"use strict";
ADSAFE.go("APPNAME_", function(dom){
   //application code
});

Let’s explore this object in more depth to see the markup required around the go request.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.128.205.21