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

Traffic Cop
March 23, 2020 | by Kean Graham
Traffic Cop Tutorial: How to block ads from serving to invalid traffic - GAM or PGHB + Hardcoded AdX or AdSense

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

ad code

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

code

code example

Check out PubGuru University to learn more about deploying ad tags, 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

body group

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

body group select

Click Update Groups

Click Advanced Ads > Ads > New Ad

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

Ad type: Plain Text and Code

Paste the tag in the space provided under Ad Parameters

ad parameters

Set Display and Visitor condition as needed

Select Group

select group

Click Publish

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

select ad placement

Repeat steps for the next tag you need to deploy.

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

widgets

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

widget location

Watch this tutorial for more info:

Ad Inserter

Click Settings > Ad Inserter

Use a new ad block and paste the <body> tag provided to you.

Specify which page categories you’d like it to show up and which spot on the page

ad code

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

If the ad is intended for the sidebar, specify which page categories this ad will serve but keep Insertion: Disabled

insertion disabled

Then, go to Appearance > Widgets

widgets

Drag Ad Inserter into position and select which block you’d like to show on the spot selected, then click Save

available widgets

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

ad parameters

Set Display and Visitor condition as needed

Click Publish

Select Head placement

head code

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

Ad Inserter

How to setup a test page: 

Click Settings > Ad Inserter

Click (Ad Inserter General Settings)

Click the Header tab

Paste the <head> code in the space provided

Click to enable

html page header code

Click Save Settings

In case you have separate Header tags for different sections of your site, check out the first tutorial above.

 

If using WordPress, you can deploy the <body> tags using a plugin as follows:

Advanced Ads

Click Advanced Ads > Groups & Rotation > Add New Group

Give it a name & save

body group

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

body group selection

Click Update Groups

Click Advanced Ads > Ads > New Ad

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

Ad type: Plain Text and Code

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

ad parameters

Set Display and Visitor condition as needed

Select Group

select group

Click Publish

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

select ad placement

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

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

widgets

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

widgets save

Watch this tutorial for more info:

Ad Inserter

Click Settings > Ad Inserter

Use a new ad block and paste the <body> tag provided to you.

Specify which page categories you’d like it to show up and which spot on the page

ad code

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

If the ad is intended for the sidebar, specify which page categories this ad will serve but keep Insertion: Disabled

insertion disabled

Then, go to Appearance > Widgets

widgets

Drag Ad Inserter into position and select which Block you’d like to show on the spot selected, then click Save

widget placement

Test it!

  1. Download PubGuru Ad Inspector
  2. Open a page on your site where the ads are deployed
  3. Turn on PubGuru Ad Inspector and click Refresh page
  4. Under the Logs tab, you will see the status of Traffic Cop

PubGuru Ad Inspector

Google Analytics and GDPR Compliance

Our tech is now able to seamlessly handle Google Analytics tracking and compliance to 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 in advance 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 demo

  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!

See the video tutorial here:

Ad Ops Tips & Guides, Industry News, Latest Tech and Success Stories - right in your inbox.

We are committed to protecting you Privacy Data

Here’s the course that 300+ pubs used to scale their ad revenue.

Enroll today

Book Banner

"Working with MonetizeMore has been a transformative experience as they helped to increase my overall revenues by over 180%"

$100M+

Paid to Publishers

3B+

Ad Requests Monthly

1500+

Happy Publishers

Recommended Reading

fake-traffic
Traffic Cop
Last updated: March 22, 2023

The High Cost of Fake Traffic: $143 Billion Gone

Read More
google-ad-manager-advanced-guide-troubleshoot
DoubleClick For Publishers / Google Ad Manager Ad Optimization
March 20, 2023

Google Ad Manager Advanced Troubleshooting Guide for Display Ads

Read More
how-to-stop-invalid-adsense-activity
AdSense Policy, News & Updates
March 16, 2023

Invalid AdSense Activity: The Silent Killer of Your Online Revenue

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