Saturday, August 29, 2015

Quick Tip: Implement the new Google AdMob / Adsense Cookie Policy

In the last days Google sent out emails to App developers which uses their AdSense and AdMob frameworks. Google urges them to inform their users about the usage of the advertising cookies:

From Google:
European laws require that digital publishers give visitors to their sites and apps information about their use of cookies and other forms of local storage. In many cases these laws also require that consent be obtained.

In this tutorial I'll  show how you can implement an information alert about the cookie usage in SWIFT. The basic idea is to detect, if the app is started the first time:
  • If yes show an alert with a message about the cookie usage. 
  • After clicking 'OK' store a key in NSUserDefault. 
  • Next time the application is started, this key will be found and therefore no alert will be shown.

IMPORTANT: I'm not a lawyer. So no guarantees. You have to decide on your own if this is sufficient.

AdMob Cookie Usage