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

Skip to first unread message

Sean Barbera

Nov 6, 2014, 1:27:31 PM11/6/14
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?



Eric Leichtenschlag (Mobile Ads SDK Team)

Nov 13, 2014, 5:56:07 PM11/13/14
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.


Sean Barbera

Nov 13, 2014, 6:01:14 PM11/13/14

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







  <script src="//"></script>


    // Send a color=red event when ad loads."color", "red");


    handleClick = function() {

      // Send a color=green event when ad is clicked.“color”, "green"); URL,’p’);




    #ad {

      width: 320px;

      height: 50px;

      top: 0px;

      left: 0px;

      font-size: 24pt;

      font-weight: bold;

      position: absolute;

      background: green;

      color: red;

      text-align: center;





<div id="ad" onclick=”adClicked(‘link goes here’)” ><img src=”” 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');






“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
To unsubscribe from this group and all its topics, send an email to
For more options, visit

Reply all
Reply to author
0 new messages