DoubleClick - How do we set a Target window for an iOS in app ad click?

174 views
Skip to first unread message

Sean Barbera

unread,
Nov 6, 2014, 1:27:31 PM11/6/14
to google-adm...@googlegroups.com
Our Dev team is working on an iOS app and integrating DFP ad units.

The ad units are configured in DFP to open _Top

But when an ad is clicked in the app the click through is opened in a Safari Browser.

How do we change the settings of the ad unit in the iOS app so an ad opens within the app as apposed to opening in a browser window?

Best

Sean


Eric Leichtenschlag (Mobile Ads SDK Team)

unread,
Nov 13, 2014, 5:56:07 PM11/13/14
to google-adm...@googlegroups.com
I'm not sure what that setting does for apps. My guess is that's is only used for web.

Starting in iOS SDK 6.10.0, ads open in Safari by default. Currently, the only override is to have your creative open an overlay (using mraid.openOverlay() for example) instead of a url. That would have to be your own template or custom creative though. DFP's templates which don't use openOverlay all open in the external browser.

Thanks,
Eric

Sean Barbera

unread,
Nov 13, 2014, 6:01:14 PM11/13/14
to google-adm...@googlegroups.com

Hi Erik,

 

Thank you for the quick reply.

 

This is the custom creative code were are just about to test delivering it through DFP into an in-app ad unit.

 

We shall see what happens

 

Best,


Sean

 

<html>

<head>

  <script src="//media.admob.com/api/v1/google_mobile_app_ads.js"></script>

  <script>

    // Send a color=red event when ad loads.

    admob.events.dispatchAppEvent("color", "red");

   

    handleClick = function() {

      // Send a color=green event when ad is clicked.

      admob.events.dispatchAppEvent(“color”, "green");

      admob.events.openOverlay(OUR URL,’p’);

    };

  </script>

  <style>

    #ad {

      width: 320px;

      height: 50px;

      top: 0px;

      left: 0px;

      font-size: 24pt;

      font-weight: bold;

      position: absolute;

      background: green;

      color: red;

      text-align: center;

    }

  </style>

</head>

<body>

<div id="ad" onclick=”adClicked(‘link goes here’)” ><img src=”http://static.jdate.com/Campaigns/~Test/CRTV-1051-JD_App_Download-320x50-f.png” alt=”” style=”display: block;” /></div>

function adClicked(relativeUrl) {

  var current = location.href;

  var base = current.substring(0, current.lastIndexOf('/') + 1);

  var destination = base + relativeUrl;

  // Open the landing page locking the screen in landscape.

  admob.opener.openOverlay(destination, 'l');

}

</body>

</html>

 

 

“Do what you can, with what you have, where you are.”  - Theodore Roosevelt


Sean Barbera
Director, Ad Operations


Spark Networks | Igniting Relationships®
3300 N. Ashton Blvd. Suite 240 | Lehi, UT 84043
p. 801 377 6411 ext. 6443 | f. 801 377 6332

--

---
You received this message because you are subscribed to a topic in the Google Groups "Google AdMob Ads Developers" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/google-admob-ads-sdk/LNDdoKi5ODI/unsubscribe.
To unsubscribe from this group and all its topics, send an email to google-admob-ads...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages