Share with
your colleagues!

How to check ads for third-party cookie dropping?

Written by Roy
Apr 5, 2022 • 3 min read
PDF Version
Download instantly
AdValify.io chevron_right Knowledge Base chevron_right
HTML5 & Ad Tags
PDF Version
Download instantly

As a publisher, you want to be in control over the cookies dropped on your web pages. Privacy laws and high fines non-compliance makes it imperative to check ads for third-party cookie dropping.

But how do you detect the ads that drop cookies?

In this tutorial I'll explain how to check ads for cookie dropping using an automated and programmatic method.

Small publishers can run the ad on a test page and manually check in Chrome Dev Tools which cookies have been dropped. Although this works fine, it's obviously not scalable when you have thousands of ads to check.

Let's use an API to detect cookie dropping

Wouldn't it be great to automate the whole process? Use the APIs from AdValify.io to automatically detect third-party cookies dropping of ads.

Here's how to do that using PHP.

First, download this PHP class from Github:
https://github.com/AdValify/ad-validator-php

Then, run these lines of code:

include("AdValify.php");
$AdValify = new AdValify();
$array = $AdValify->scanTag("This is an ad tag...");
$cookies = $array['cookies']; //array

Once you have that cookie array, you can use it further down in your logic. For example, if the array contains more than 1 item, flag the creative in your database that it needs user-consent. Check out the complete API Documentation for a list of all data points collected by the scanner.

The array holds all cookies dropped, including first-party cookies. You can easily distinguish first-party from third-party cookies by looking at the domain on which the cookie has been set.

Integrate AdValify's APIs into your product

APIs are fast, scalable and allows you to automate the whole creative quality assurance process. You can litterally scan thousands of ads and list all cookies dropped to make sure you comply with international privacy laws.

It's also a great way to verify that your ad networks, DSPs and SSPs are obeying the consent strings in your tags.

Scan ads online to detect cookies dropped

No time to set up the API? Use this free online ad tag tester to scan ads. It will give you lots of information, like CPU usage, cookies dropped, load size and SSL-compliancy. Great time-saver!

Free Ad Tag Tester Online

Conclusion

Listing all cookies dropped by creatives and ad tags can be time-consuming. Online scanners make your life a bit easier by analyzing the ad in seconds. If you want to take it a step further, APIs are a powerful tool to automate and scale cookie detection of ads.


Download this article as PDF?

No time to read the whole article? Download a free PDF version of this article for later:

Permalink

To link to this article, please use:
https://www.advalify.io/check-ads-cookie-dropping-17255

External Resources

More from AdValify.io