{"id":4987,"date":"2022-02-16T11:56:03","date_gmt":"2022-02-16T08:56:03","guid":{"rendered":"https:\/\/trackingchef.com\/?p=4987"},"modified":"2022-09-04T17:17:45","modified_gmt":"2022-09-04T14:17:45","slug":"logging-fraudulent-clicks-for-ip-exclusion-and-credit-recovery-in-google-ads","status":"publish","type":"post","link":"https:\/\/trackingchef.com\/google-analytics\/logging-fraudulent-clicks-for-ip-exclusion-and-credit-recovery-in-google-ads\/","title":{"rendered":"A simple solution for minimizing click fraud in your Google Ads account (w\/o external apps!)"},"content":{"rendered":"\n

Click Fraud on Google ads, especially in their display network, has become a massive issue to the extent that advertisers are actually refraining from using it at all. In basic terms – we don’t trust Google anymore to show our ads to human audiences. Most of us are familiar with 3rd party click-fraud prevention solutions (Cheq<\/a> and Clickcease<\/a> to name two). While these tools are great and perform well, not everyone can justify their cost and there are those of us who may have an issue with giving a 3rd party that kind to access to our campaigns. <\/p>\n\n\n\n

In a previous post<\/a>, I’ve discussed how you can use Google’s reCAPTCHA tool to identify fraudulent clicks in your campaigns, by applying a GTM script by Simo Ahava to trigger Google Ads conversion tracking and report it in Data Studio. <\/p>\n\n\n\n

Today I want to present you with an elegant DIY solution that will enable you to identify, capture and report invalid traffic on Google ads. Implementing this solution will provide you with two “super-powers”:
All the information required to block click-fraud IPs, as well as filing an Invalid Traffic Investigation (ITI) on Google. <\/p>\n\n\n\n

The scripts used in this post retain the core functionality described by Simo, so you can also use the Google Analytics events he suggests (can be used for simple visualization of the data).<\/p>\n\n\n\n

NERD ALERT<\/strong> – I should point out, that it get’s rather technical from this point on. I’ll try to break it down into simple steps and I’m sure you’ll find it easier than it looks. Just bear with me and shoot me any technical questions you have on my Twitter<\/a>.<\/p><\/blockquote>\n\n\n\n

While there are several great companies out there that offer these services, not every advertiser can justify the use of such tools in their stack. <\/p>\n\n\n\n

Why do you need this report?<\/h2>\n\n\n\n

To deal with fraudulent traffic in your campaigns, Google Ads provides two tools:<\/p>\n\n\n\n

  1. IP exclusion – You can exclude up to 500 IP address from each campaign to make minimize fraudulent clicks from competitors and click farms.<\/li>
  2. Invalid Traffic Investigation – In the case of your campaigns being attacked by fraudulent clicks, you can also request an Invalid Traffic Investigation (ITI) by Google.<\/li><\/ol>\n\n\n\n

    For both solutions, you need to have access to the data of the visitors identified as potentially fraudulent traffic. The minimal data required is their IP, but for the ITI you would also need the user’s GCLID parameter, User Agent and URL visited.<\/p>\n\n\n\n

    The “standard” way of collecting this data is using server logs. These are files saved, well, on your servers, that log every request (e.g. HTML page, image load, etc.) by visitors on your site. Analyzing these logs is complex (although there are some tools that simplify) but also doesn’t contain a clear indication of whether or not a visitor is suspected to be a bot.<\/p>\n\n\n\n

    With the log you create with this framework, you can easily collect all the data required, only on fraudulent visits, without any hassle. It also comes in a format you can easily use to submit to Google.<\/p>\n\n\n\n

    Setting up the log<\/h2>\n\n\n\n

    Create a reCAPTCHA account<\/h3>\n\n\n\n

    First, go to the reCAPTCHA site and register your website (for free):
    https:\/\/www.google.com\/recaptcha\/admin\/create<\/a><\/p>\n\n\n\n

    Make sure you select reCAPTCHA V3 and register all relevant domains.<\/p>\n\n\n

    \n
    \"image-4760357\"<\/figure><\/div>\n\n\n

    Copy the Site Key and Secret Key, you’ll need them in a few steps.<\/p>\n\n\n\n

    \"image-2474830\"<\/figure>\n\n\n\n

    Create an Integromat webhook<\/h3>\n\n\n\n

    Next, go to Integromat <\/a>and create a new Scenario (you can create a free account for that).<\/p>\n\n\n\n

    The scenario will use two services: Webhooks and Google Sheets.<\/p>\n\n\n

    \n
    \"image-9137585\"<\/figure><\/div>\n\n\n

    Add your first module of the type Webhooks and set it as a Trigger: Custom Webhook<\/p>\n\n\n

    \n
    \"image-3258373\"<\/figure><\/div>\n\n\n

    Add a new webhook and name it something memorable, e.g. reCAPTCHA Log<\/p>\n\n\n

    \n
    \"image-4686105\"<\/figure><\/div>\n\n\n

    To enable the webhook, click on ‘Re-determine data structure’ and then ‘Copy address to clipboard’.<\/p>\n\n\n

    \n
    \"image-4197446\"<\/figure><\/div>\n\n\n

    Paste the address copied into the form below and hit send.<\/p>\n\n\n\n

    \n
    \n \n