AdSense has introduced a new user consent policy which requires publishers to ask permissions from users to use their data. This is to comply with European Union data protection policy so that users from from any of the EU countries are greeted with a permission mechanism on their first visit.
Google’s T&C for publishers requires them to implement the mechanism on both desktop and mobile websites as well as apps that use Google’s ads. As a web publisher, you can use the method I’ve followed to implement this on your website.
In case you want to look into alternative methods, you can head over to the Cookie Choices website setup by Google to help publishers get started.
One important thing that all the above does not mention is differentiating between EU users and rest of the world. I’m still working on finding a good and simple solution for that but until I do, I will stick with and recommend silktide.