MRAID Sample AdsIntroductionThis document provides sample ads that demonstrate the basic functionality of the ad types described in the MRAID v1.0 and v2.0 standards and supported in Opera Mediaworks’ SDKs. Each example below provides an HTML code snippet, a list of the methods and events used, and the expected behavior for a given ad type. The ads were successfully tested using AdMarvel’s iOS and Android Tester Apps. They were also successfully tested using the MRAID web tester, a tool that simulates an SDK environment. Any exceptions in web tester behavior are noted in the respective sections. AudienceThis document is for anyone creating MRAID-compliant ads meant to run in Opera Mediaworks SDKs. Some familiarity with the MRAID specification is required. MRAID v2.0 AdsEach ad type here uses at least some functionality that is only available in MRAID v2.0. The URLs contain raw HTML code and must be used as HTML snippets/fragments. They are not complete HTML documents/pages. Following are the available ad types:
Expand with Orientation Locked to PortraitAd HTML Snippet URL http://admarvel.s3.amazonaws.com/demo/mraid/MRAID_v2_expand_with_locked_portrait_orientation.txt Methods
Events
Expected Behavior This ad renders as a 320×50 banner that attempts to expand when clicked. No special expand properties are set, but Expand Stay Centered Using Size ChangeAd HTML Snippet URL http://admarvel.s3.amazonaws.com/demo/mraid/MRAID_v2_expand_stay_centered.txt Methods Used
Events Used
Expected Behavior This ad renders as a 320×50 banner that attempts to expand when clicked. No special expand properties are set. The ad uses the Simple ResizeAd HTML Snippet URL http://admarvel.s3.amazonaws.com/demo/mraid/MRAID_v2_simple_resize.txt Methods Used
Events Used
Expected Behavior This ad renders as a 320×50 banner that attempts to resize to a 320×250 non-modal ad when clicked. The resize properties are setup so that the width is 320, the height is 250, the offsetX is 0, offsetY is 0, and Video InterstitialAd HTML Snippet URL http://admarvel.s3.amazonaws.com/demo/mraid/MRAID_v2_video_interstitial.txt Methods Used
Events Used
Expected Behavior This ad renders as a full screen video interstitial. It forces landscape orientation using This ad works in the web tester with the following exceptions:
Diagnostic AdAd HTML Snippet URL http://admarvel.s3.amazonaws.com/demo/mraid/MRAID_v2_diagnostics.txt Methods Used
Events Used
Expected Behavior This ad is intended to help diagnose problems that are occurring in the MRAID container. It can run as a banner or an interstitial. Since there is a lot of information to fit in this ad, run it as at least a 320×250 banner. Also, it is much easier to use in a simulator than on device where values are hard to edit. This ad provides access to all MRAID v2 APIs and also listens to all MRAID v2.0 events. When an event fires the affected value flashes green for a second to provide a visual clue that this values changed. This ad is also useful for testing cases not covered by the specific test ads above. Potential useful test cases include more complicated resize scenarios, resize and then expand, two part expands, etc. The testing AdMarvel performed in the web tester was limited compared to the functionality this ad exposes. However, here are the issues:
MRAID v1.0 AdsThese ads run fine in both MRAID v1.0 and v2.0, though the behavior might be slightly different depending on the SDK implementation. The URLs contain raw HTML code and must be used as HTML snippets/fragments. However, they are not complete HTML documents/pages. Following are the available ad types: Expand with Custom CloseAd HTML Snippet URL http://admarvel.s3.amazonaws.com/demo/mraid/MRAID_v1_expand_with_custom_close.txt Methods Used
Events Used
Expected Behavior This ad renders as a 320×50 banner that expands when clicked. The expand properties set a 320×250 size and Expand Using
|