Sunday, 15 February 2015

smaato - Do I need to provide mraid.js script within the ad markup? -



smaato - Do I need to provide mraid.js script within the ad markup? -

i see many examples of mraid ads begins

<script src="mraid.js"></script>

is script available on every mraid compatible device or need set src attribute real mraid.js located somewhere on internet?

initializing/starting mraid ad

always include or add together “mraid.js” creative possible. mraid permits either including script tag in html, or via dom insertion. requirement creative proper mraid ad. advertisement designers assume container automatically inject mraid libraries (and containers this) script tag must included ensure proper advertisement behavior in mraid implementations.

html technique

<html> <head> <script src="mraid.js"></script>

dom insertion technique

<script type="text/javascript"> var head = document.getelementsbytagname('head').item(0), js = document.createelement('script'), s = 'mraid.js'; js.setattribute('type', 'text/javascript'); js.setattribute('src', s); head.appendchild(js); </script>

for more info see page 5 of mraid best practices

mraid smaato

No comments:

Post a Comment