Interpreting Full Referrer in Google Analytics

17,320

Solution 1

As John says, this is fake traffic known as "referral spam". This morning I had about 80% of my "traffic" coming from this same domain.

Rest assured, you are not paying Google for these clicks.

The basic idea behind referral spam is that some hosts will publish their logs or Analytics data publicly, thus creating links and/or text references to their spam-domain.com. So these spammers send fake requests to your site with spam-domain.com as the referrer header in the hopes that you'll publish those links for some reason and give them an SEO boost.

Obviously, this is highly annoying and worse if you don't notice or account for it you, may be making bad business decisions based on incorrect data. There also doesn't seem to be any really simply way to prevent this type of thing. The reason being is that in the case of many of these referral spammers they're not sending any actual requests to your server. If you check your logs, you'll likely not find any requests made where the domain in question was sent as the actual referrer. What they are doing is sending fake tracking calls to Google Analytics for random Google Analytics account #s. Thus, because they're not actually visiting your server, in many cases blocking them at the server level will not do you any good. If you do see the domain in your server logs, blocking that particular referrer in .htaccess for example should solve the problem.

So in the case where they're only spamming via Google Analytics, the only way to block this spammy data is at through Google Analytics filters, unfortunately. The most accurate way to do this will be to create a View filter that excludes any session where the referrer is spam-domain.com. This is non-ideal because you have to manually maintain the list going forward.

Alternatively, you can also filter based on the hostname in the request. Because the spammers don't know your actual domain name, they only know a Google Analytics account # that they've generated at "random", they're unable to pass your domain name with the pageview. So in Analytics, you can go to Audience->Technology->Network, and you'll see various hosts listed, some of which will be yours, others which will be valid domains like webcache.googleusercontent.com, translate.googleusercontent.com or other domains where you may be using the same tracking code. You'll also see a bunch from the spam-domain.com. So to avoid having to manually update your list of blocked domains, you can setup a filter that will only allow data from your known good domains. The only downside of this is that you may lose traffic data if you miss a domain or forget to add it in the future.

A possible third option is that you can just change your Google Analytics Tracking ID to something that doesn't end in -1. It seems many of these guys doing Analytics spam are lazy, and only check the first property of an Analytics account. This isn't something you'd want to rely on though, as the domain you mentioned either has somehow crawled valid Anaytlics Tracking IDs, or is trying many property values for each account.

Solution 2

I've got the same from lots of spam referral doamins and I want to share a PHP code that you may include in your header.php or something else.

With this code you can redirect the spam domain to itself.

<?php
$spams = array ( 
                "hardcore.anzwers.net",
                "femmesdenudees.com",
                "villagedusexe.com",
                "gratuitbaise.com",
                "inbabes.sexushost.com",
                "mature.free-websites.com", 
                "simple-share-buttons.com", 
                "darodar.com",
                "social-buttons.com", 
                "hulfingtonpost.com", 
                "get-free-traffic-now.com",
                "buttons-for-website.com",
                "4webmasters.org",
                "4webmasters.com",
                "ranksonic.org",
                "ranksonic.com",
); 
// array of evil spammers 

$ref = $_SERVER["HTTP_REFERER"]; 

foreach ($spams as $site) { 
    $pattern = "/$site/i"; 
    if (preg_match ($pattern, $ref)) { 
        header("Location: $ref"); exit(); 
    } 
} 
?>

and you can save it as 'no-refer-spam.php' use as following (in 'header.php' for example):

<?php
if(file_exists('no-refer-spam.php')){
    require('no-refer-spam.php');
}
?>

Solution 3

Google Analytics now has a Referral Exclusion List. Select your property, go to Admin, then Tracking Info, then Referral Exclusion List. I just started using this feature to block 4webmasters and some other particularly annoying referral spammers, and it does appear to be working.

Share:
17,320

Related videos on Youtube

TSG
Author by

TSG

Updated on September 18, 2022

Comments

  • TSG
    TSG almost 2 years

    I pay for advertising through google adwords, and I'm watching to ensure I'm not paying for fake clicks. (I'm new at this). I have setup Google Analytics and I'm not sure how to interpret the FULL REFERRER field (see screenshot attached). Notice the full referrer is "4webmasters.org" which appears to be a bogus site.

    Does this mean Google Adwords is displaying an ad on this site which is then referring to me? (i.e. I'm paying for this)? By 9am up to 50% of my traffic looks like this (with the actualy referrer changing daily, but always a bogus site)

    Can someone tell me how to interpet this?

    Google Analytics Report

  • TSG
    TSG over 9 years
    Is it possible to remove this fake traffic from google analytics without having to manually filter each (fake) referer domain?
  • MrWhite
    MrWhite over 9 years
    I have read that your Google Analytics account can be targeted directly. So this "referer spam" appears in your Analytics account, without a request to your website. Attempting to block these type of requests on your website then has no effect... stackoverflow.com/questions/29232903/…
  • nathangiesbrecht
    nathangiesbrecht about 9 years
    That's a nice solution for refer spam that actually hits your page. As my answer above indicates though, in this particular case the spammer is not sending actual traffic to the website, it's just sending fake hits to Google Analytics, they never actually touch your website.