Trigger for ORMMA code injection into application's webView, and how ad's JavaScript knows it runs in ORMMA

14 views
Skip to first unread message

Boris Sh.

unread,
Feb 17, 2015, 4:15:45 AM2/17/15
to ormma-di...@googlegroups.com
Hi,
I have spent a lot of time trying to understand, how application "knows" how to treat the current ad.
The only clear standard is MRAID, which specifically tells to add the 'src="mraid.js"' tag, and thus, application can parse the
response/ad tag , and inject the MRAID code. How should I implement such flow for ORMMA?

The second problem I am facing, is related to ad's perspective.
How ad knows , which SDK/Standard it currently runs in?

What is general approach in Mobile ads design?
Should each ad be designed targeted for specific SDK/Standard (MRAID or something else), or I can use regular HTML5
ad, and only replace the part which "talks" to SDK each time, depending on current SDK I am in.

Thank you in advance for any help!

Nathan Carver

unread,
Feb 18, 2015, 9:39:43 AM2/18/15
to ormma-di...@googlegroups.com
Hi Boris,

I don't know anyone who is using the ORMMA standard anymore. Most of the SDKs have switched over to the newer MRAID definition.

The ad knows that it is in an MRAID container if it can find the "mraid" JavaScript object. I usually do a check for something like if (typeof mraid === 'object' && mraid.getState) { /* in an mraid container */ }.

As a general approach, mobile ad design is the same as HTML ad design. Every MRAID container can display HTML. The main adjustment is to use mraid.open() instead of hyperlinks for click-throughs. Other than that, the only adjustment is if your ad needs to expand or collapse. In those cases, it addition to showing more of your ad, you also need to call mraid.expand() and mraid.close(). 

Hope that helps.

Thanks,
-Nathan


--
You received this message because you are subscribed to the Google Groups "ORMMA-discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ormma-discussi...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages