Intercept clicks to DFP banner in iOS

98 views
Skip to first unread message

Chris Anderson

unread,
Jul 7, 2014, 11:25:35 AM7/7/14
to google-adm...@googlegroups.com
How can I intercept and prevent clicks on banner ads in iOS? E.g., when a user taps a link, I don't want to load the click thru URL but instead perform some in-app action. All of the delegate methods seem to provide functionality for responding to these click events but not in actually handling them.

Eric Leichtenschlag

unread,
Jul 10, 2014, 2:15:10 PM7/10/14
to google-adm...@googlegroups.com
Most ads that are served (especially those created from templates) have some special APIs baked in that tell the SDK an ad has been cilcked so it can perform the action. If you were to just make a custom creative with an onClick function in html, the content in the webview may change, but the SDK/app may not know about it.

If you have control over the creatives you're serving, DFP has a feature called app events where you can have the creative send your app a message. There is a working example here showing off app events. The creative calls admob.events.dispatchAppEvent("name", "info") to send the message.

Thanks,
Eric 
Reply all
Reply to author
Forward
0 new messages