Skip to navigation

Website tag blocking (Google Ad Manager)

Stop ads from loading for bots and other non-human visitors on your website with the Pixalate Tag Server.

The Pixalate Tag Server checks ad requests from the browser against Pixalate’s fraud detection before your ad code is released to the page. If a request looks suspicious or fraudulent, the Tag Server suppresses it, and no ads load for that visitor. This page is for publishers who serve ads with Google Ad Manager (called DoubleClick for Publishers, or DFP, before 2018) and Google Publisher Tag (GPT).

How it works

The Tag Server makes a real-time decision for each ad request. It aims ads away from machine visitors, such as bots, malware and crawlers, without interfering with the human visitors who see your ads and without adding significant delay.

The decision comes from a model trained on historical and real-time data. Examples of the data points it uses:

  • IP address
  • User ID
  • Visitor ID (cookie)
  • User-agent string
  • Geographic location
  • How often requests arrive over different time ranges
  • Overall traffic characteristics of the IP address, for example whether it comes from a gateway, a public proxy, a company network or a home router

Before you start

You need these from Pixalate. To get them, contact your Pixalate account manager:

  • A Client ID and a Box ID.
  • The Pixalate script tag for your site, which replaces your GPT loader. Pixalate’s ad operations team prepares it for your Client ID and Box ID.
  • For testing, the URL of the self-service test page and a username and password for it.

Add the Tag Server to your pages

This setup is in the page header, and needs the fewest changes to your pages.

1

Find your GPT loader

Find the script block that loads Google Publisher Tag (gpt.js). It’s usually in the page header. On older pages it looks like this:

<script type="text/javascript">
var googletag = googletag || {};
googletag.cmd = googletag.cmd || [];
(function() {
var gads = document.createElement('script');
gads.async = true;
gads.type = 'text/javascript';
var useSSL = 'https:' == document.location.protocol;
gads.src = (useSSL ? 'https:' : 'http:') +
'//www.googletagservices.com/tag/js/gpt.js';
var node = document.getElementsByTagName('script')[0];
node.parentNode.insertBefore(gads, node);
})();
</script>
2

Replace it with the Pixalate script tag

Replace the entire GPT script block with the script tag that Pixalate gave you.

3

Test both outcomes

Before you go live, check that your pages behave correctly when a visitor is blocked and when they aren’t. See Test your setup.

Test your setup

You can force the blocked and not-blocked outcomes in two ways: with the ef flag, or from the self-service test page.

The Tag Server uses two template sections: code inside a {?block} section is rendered when an impression is blocked, and code inside a {^block} section is rendered when it isn’t.

Use the ef flag

The Pixalate script’s ef flag takes these values:

ValueBehavior
ef=1Normal fraud detection. This is the default.
ef=2Tests the blocked case: code in {?block} is rendered, and code in {^block} is left out.
ef=3Tests the not-blocked case: code in {?block} is left out, and code in {^block} is rendered.

Ask Pixalate where to set ef in your script tag.

Use the self-service test page

The test page applies an action to the IP address you’re browsing from, as Pixalate detects it.

  1. Open the test page URL that Pixalate gave you.
  2. Sign in with the username and password Pixalate supplied.
  3. Choose an option:
OptionEffect on your current IP address
Block MeTests the blocked case: code in {?block} is rendered, and code in {^block} is left out.
Unblock MeTests the not-blocked case: code in {?block} is left out, and code in {^block} is rendered.
Whitelist MeWhitelists your IP address, so it bypasses the fraud checks.

Every option expires after one hour. Your IP address then goes back to its original state.

Questions? Contact your Pixalate account manager or support@pixalate.com.