Traffic Cop Tutorial: How to block ads from serving to invalid traffic – GAM or PGHB + Hardcoded AdX or AdSense

Traffic Cop
Last updated: February 24, 2025 | by Aleesha Jacob
how-to-block-ads-from-serving-to-ivt

This post was most recently updated on February 24th, 2025

Safeguarding your ad inventory from invalid traffic (IVT) is paramount. The consequences of non-compliance with Google’s ad traffic policies can be detrimental to your revenue and reputation. This comprehensive guide will provide actionable steps to use our award-winning ad fraud solution, Traffic Cop, to block ads from serving to invalid traffic.

Step-by-Step Guide to blocking ads from serving to IVT

You will be provided with a new set of AdSense or Ad Exchange tags, which looks something like this:

Traffic Cop Tutorial: How to block ads from serving to invalid traffic - GAM or PGHB + Hardcoded AdX or AdSense MonitizeMore

Your Google Ad Manager (GAM) tags will also be replaced with a new set of ad tags that looks something like this:

Traffic Cop Tutorial: How to block ads from serving to invalid traffic - GAM or PGHB + Hardcoded AdX or AdSense MonitizeMore

Traffic Cop Tutorial: How to block ads from serving to invalid traffic - GAM or PGHB + Hardcoded AdX or AdSense MonitizeMore

Check out PubGuru University to learn more about deploying ad tags and optimizing ads with AdSense, Google Ad Manager, and more!

AdSense/Ad Exchange Tags

    1. Remove any old hardcoded AdSense or Ad Exchange from the site
    2. If using WordPress, you can deploy the tags using any of these plugins:

Advanced Ads

Click Advanced Ads > Groups & Rotation > Add New Group

Give it a name & save it:

Traffic Cop Tutorial: How to block ads from serving to invalid traffic - GAM or PGHB + Hardcoded AdX or AdSense MonitizeMore

Edit the newly created group and set to Ordered Ads & select the number of ads you want to display per page.

Traffic Cop Tutorial: How to block ads from serving to invalid traffic - GAM or PGHB + Hardcoded AdX or AdSense MonitizeMore

Click Update Groups

Click Advanced Ads > Ads > New Ad

Give it a title or name. Something that would allow you to identify this ad (e.g., ad_top_sidebar) easily

Ad type: Plain Text and Code

Paste the tag in the space provided under Ad Parameters

Traffic Cop Tutorial: How to block ads from serving to invalid traffic - GAM or PGHB + Hardcoded AdX or AdSense MonitizeMore

Set Display and Visitor conditions as needed

Select Group

Traffic Cop Tutorial: How to block ads from serving to invalid traffic - GAM or PGHB + Hardcoded AdX or AdSense MonitizeMore

Click Publish

Select the placement or spot where you’d like it to show up

Traffic Cop Tutorial: How to block ads from serving to invalid traffic - GAM or PGHB + Hardcoded AdX or AdSense MonitizeMore

Repeat the steps for the next tag you need to deploy.

If the ad is intended for the sidebar, click Appearance > Widgets

Traffic Cop Tutorial: How to block ads from serving to invalid traffic - GAM or PGHB + Hardcoded AdX or AdSense MonitizeMore

Drag Advanced Ads into position and select which ad you’d like to show on the spot selected, then click Save

Traffic Cop Tutorial: How to block ads from serving to invalid traffic - GAM or PGHB + Hardcoded AdX or AdSense MonitizeMore

Watch this tutorial for more info:

Google Ad Manager tags

    1. Remove any old Google Ad Manager tags deployed on the site from both <head> & <body> sections.
    2. If using WordPress, you can deploy the new <head> tag using any of these plugins:

Advanced Ads

Click Advanced Ads > Ads > New Ad

Give it a title or name. Something that would allow you to easily identify this ad (e.g. Head – All Pages)

Ad type: Plain Text and Code

Paste the <head> code in the space provided under Ad Parameters

Traffic Cop Tutorial: How to block ads from serving to invalid traffic - GAM or PGHB + Hardcoded AdX or AdSense MonitizeMore

Set Display and Visitor conditions as needed

Click Publish

Select Head Placement:

Traffic Cop Tutorial: How to block ads from serving to invalid traffic - GAM or PGHB + Hardcoded AdX or AdSense MonitizeMore

In case you have separate Header tags for different sections of your site, follow this tutorial:

 

Advanced Ads

Click Advanced Ads > Groups & Rotation > Add New Group

Give it a name & Save:

Traffic Cop Tutorial: How to block ads from serving to invalid traffic - GAM or PGHB + Hardcoded AdX or AdSense MonitizeMore

Edit the newly created group and, set to Ordered Ads & select the number of ads you want to display per page.

Traffic Cop Tutorial: How to block ads from serving to invalid traffic - GAM or PGHB + Hardcoded AdX or AdSense MonitizeMore

Click Update Groups

Click Advanced Ads > Ads > New Ad

Give it a title or name. Something that would allow you to identify this ad (e.g., ad_top_sidebar) easily

Ad type: Plain Text and Code

Paste the <body> tag in the space provided under Ad Parameters

Traffic Cop Tutorial: How to block ads from serving to invalid traffic - GAM or PGHB + Hardcoded AdX or AdSense MonitizeMore

Set Display and Visitor conditions as needed

Select Group

Traffic Cop Tutorial: How to block ads from serving to invalid traffic - GAM or PGHB + Hardcoded AdX or AdSense MonitizeMore

Click Publish

Select the placement or spot where you’d like it to show up

Traffic Cop Tutorial: How to block ads from serving to invalid traffic - GAM or PGHB + Hardcoded AdX or AdSense MonitizeMore

Repeat steps for the next <body> tag you need to deploy.

If the ad is intended for the sidebar, click Appearance > Widgets

Traffic Cop Tutorial: How to block ads from serving to invalid traffic - GAM or PGHB + Hardcoded AdX or AdSense MonitizeMore

Drag Advanced Ads into position and select which ad you’d like to show on the spot selected, then click Save

Traffic Cop Tutorial: How to block ads from serving to invalid traffic - GAM or PGHB + Hardcoded AdX or AdSense MonitizeMore

Watch this tutorial for more info:

Google Analytics and GDPR Compliance

Traffic Cop seamlessly handles Google Analytics tracking and compliance with GDPR, with no extra codes needed! This makes implementation a lot simpler and unloads a bunch of codes from your site.

  1. Remove your Google Analytics tracking codes and any GDPR codes.
  2. Inform your MonetizeMore Account Manager if you plan to do this so you can agree on a specific schedule to deploy the changes.
  3. We’ll take care of everything else from here.

Checking Reports

Traffic Cop Tutorial: How to block ads from serving to invalid traffic - GAM or PGHB + Hardcoded AdX or AdSense MonitizeMore

  1. You will receive email instructions to set up your account on https://app.pubguru.com/
  2. Watch this quick introduction video: https://youtu.be/I8Z1BK0vUDU
  3. Witness how Traffic Cop protects your earnings from fraud traffic!

You can check out the video tutorial here:

By implementing Traffic Cop, you can significantly reduce the risk of ad revenue loss due to invalid traffic. It provides a robust defense mechanism for your ad inventory, ensuring you maintain a high-quality traffic stream that advertisers can trust. With the right setup and maintenance, you can protect your ad business and ensure its growth and sustainability. Get started with Traffic Cop here!

Traffic Cop Tutorial: How to block ads from serving to invalid traffic - GAM or PGHB + Hardcoded AdX or AdSense MonitizeMore

Recommended Reading

top-ad-exchanges
Blog
April 22, 2025

Top 10 Ad Exchanges for Publishers to Connect with MonetizeMore

Read More
best-ways-to-turn-traffic-to-money
Blog
April 21, 2025

Best Ways to Turn Your Website Traffic Into Money

Read More
why-are-blank-ads-appearing
Ad Optimization
April 17, 2025

Why are Blank Ads Appearing?

Read More

Trusted by 1,500+ publishers worldwide

10X your ad revenue with our award-winning solutions.

Let's Talk

Close

Ready to 10X your ad revenue with the #1 ad management partner?

Start Now