{"id":8775,"date":"2015-11-12T13:06:53","date_gmt":"2015-11-12T21:06:53","guid":{"rendered":"https:\/\/blog.ahrefs.com\/?p=8775"},"modified":"2021-06-29T16:05:10","modified_gmt":"2021-06-29T21:05:10","slug":"referral-spam","status":"publish","type":"post","link":"https:\/\/ahrefs.com\/blog\/referral-spam\/","title":{"rendered":"An Actionable Guide To Stopping Referral Spam In Google Analytics"},"content":{"rendered":"<p>Is ghost referral spam screwing up your Google analytics data?<\/p>\n<p>Fed up seeing spammy sites like darodar, semalt, floating-share-buttons.com and www.event-tracking.com in your list of referrers?<\/p>\n<p>Well, you\u2019re not&nbsp;alone.<\/p>\n<p>Referral spam is the bain of most webmasters at the moment and has been getting steadily worse over the past year <em>(obviously making money for someone somewhere)<\/em>.<\/p>\n<p>But fear not, Alex Dealy of loganix.net has the complete solution to your referral spam nightmare - ensuring none of those annoying spammers slip through the net and that your stats remain clean and accurate.<\/p>\n<p>Over to&nbsp;Alex\u2026<\/p>\n<h2>What\u2019s Ghost and Referral Spam Traffic and Why Does it&nbsp;Suck?<\/h2>\n<p>Spam has evolved. It\u2019s not just an inbox &amp; search engine problem anymore. It\u2019s found its way into your Google Analytics account. Just like how spammers will bend to the lowest denominator to try to squeeze into your email inbox, they\u2019ve picked up on flaws in the system to show up in data reports.<\/p>\n<p><i>Why<\/i>?<\/p>\n<p>With the dimmest glimmer of hope that you\u2019ll wonder what the hell they\u2019re doing in your report and visit their website out of curiosity.<\/p>\n<p><i>Lame, right<\/i>?<\/p>\n<p>Tell me about it! It makes data a mess\u2014for both my personal sites and client\u2019s sites that I work with at <a href=\"http:\/\/magistrateinc.com\/\">The Magistrate<\/a>.<\/p>\n<p><i>But, moar web traffic<\/i>?<\/p>\n<p>The thing is, these bots never actually visit your&nbsp;site.<\/p>\n<p>They manage to only just tickle the javascript that Google Analytics uses to notify you when a visitor normally views a&nbsp;page.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-8784 size-full\" src=\"https:\/\/ahrefs.com\/blog\/wp-content\/uploads\/2015\/11\/image03.jpg\" alt=\"ghost and referral spam\" width=\"1200\" height=\"627\" srcset=\"https:\/\/ahrefs.com\/blog\/wp-content\/uploads\/2015\/11\/image03.jpg 1200w, https:\/\/ahrefs.com\/blog\/wp-content\/uploads\/2015\/11\/image03-680x355.jpg 680w\" sizes=\"auto, (max-width: 1200px) 100vw, 1200px\"><\/p>\n<p>They can still really skew your analytics numbers, including key stats like <a href=\"https:\/\/ahrefs.com\/blog\/bounce-rate\/\" target=\"_blank\" rel=\"noopener\">bounce rate<\/a> and other engagement metrics.<\/p>\n<p>If you\u2019re making big content marketing investments based on these numbers, it\u2019s important that they\u2019re as accurate as they can&nbsp;be.<\/p>\n<p>This has made ghost and referral spam traffic a big problem for:<\/p>\n<ul>\n<li>Small businesses and solopreneurs<\/li>\n<li>Medium businesses with no dedicated marketer<\/li>\n<li>Marketing Agencies small and&nbsp;large<\/li>\n<\/ul>\n<p>And the kicker? These agents of Voldemort work fast. Real&nbsp;fast.<\/p>\n<p>Not only are the numbers of hits from spam increasing everyday, but so are the sources that have to be blacklisted and eliminated.<\/p>\n<p>We\u2019ve even seen referral spammers try such nonsensical techniques as trying to disguise themselves as Google. Why? Who&nbsp;knows?<\/p>\n<p>Here is what we see on our&nbsp;side:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-8785 size-full\" src=\"https:\/\/ahrefs.com\/blog\/wp-content\/uploads\/2015\/11\/image07.png\" alt=\"referrer spam in google analytics\" width=\"217\" height=\"393\"><\/p>\n<p>It\u2019s particularly troubling if your site is relatively new and is not yet getting much legitimate web traffic. The spam percentages are much higher, and will skew your data much more than if your site has thousands of hits a&nbsp;day.<\/p>\n<p>Here\u2019s an example of a personal site of mine. I haven\u2019t paid much attention to it, so it doesn\u2019t get a lot of hits. But with a quick look at the orange segment, you can see that only 80% of the traffic recorded in Analytics is legitimate. 20% is spam traffic!<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-8786 size-full\" src=\"https:\/\/ahrefs.com\/blog\/wp-content\/uploads\/2015\/11\/image06.png\" alt=\"snapshot of analytics data\" width=\"946\" height=\"406\" srcset=\"https:\/\/ahrefs.com\/blog\/wp-content\/uploads\/2015\/11\/image06.png 946w, https:\/\/ahrefs.com\/blog\/wp-content\/uploads\/2015\/11\/image06-680x292.png 680w\" sizes=\"auto, (max-width: 946px) 100vw, 946px\"><\/p>\n<p>The bottom line is that you need clean data to make informed decisions about your website. And to do that, you need to address and clean up this&nbsp;mess.<\/p>\n<p>Start now, because they are only going to improve their&nbsp;game.<\/p>\n<h2>Ever Wonder How Easy It&nbsp;Is?<\/h2>\n<p>A single referrer record in analytics is a single \u201cpage&nbsp;load\u201d<\/p>\n<p>Under normal circumstances, that\u2019s someone loading your page and all the other assets your page contains including images, css, javascript libraries &amp; tracking. Ghost spammers avoid all the mess and just fire off a single javascript tracking code to google thereby forging a visit that never actually shows&nbsp;up.<\/p>\n<p>That tracking \u201cpage load\u201d took 0.001 seconds on a server somewhere. At the same time, that server was also loading 100 other \u201cpage loads\u201d for different sites to muscle their way into everyone\u2019s GA account.<\/p>\n<p>When you consider how easy it is to buy another <em>(twenty)<\/em> $5 host, you\u2019ll really grasp the how easy it is for this system to get way out of&nbsp;hand.<\/p>\n<p>If the ROI is there, this problem gets far worse before it gets any better.<\/p>\n<h2>Coming Up Short: Tactics that Don\u2019t Take it All the&nbsp;Way<\/h2>\n<p>This issue first became known to the public a few years ago when a mysterious online service called Semalt <em>(hate these jerks)<\/em> started to use the technique to appear on Analytics reports.<\/p>\n<p>And, as always, social media reacted.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-8787 aligncenter\" src=\"https:\/\/ahrefs.com\/blog\/wp-content\/uploads\/2015\/11\/image00.png\" alt=\"image00\" width=\"602\" height=\"110\"> <img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-8788 aligncenter\" src=\"https:\/\/ahrefs.com\/blog\/wp-content\/uploads\/2015\/11\/image02.png\" alt=\"image02\" width=\"583\" height=\"95\"> <img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-8789 aligncenter\" src=\"https:\/\/ahrefs.com\/blog\/wp-content\/uploads\/2015\/11\/image09.png\" alt=\"image09\" width=\"578\" height=\"96\"><\/p>\n<p>If you don\u2019t believe them, believe me. It was everywhere--It\u2019s still rampant.<\/p>\n<p>But with a big problem comes an innovative solution, or so we thought.<\/p>\n<p>As it turns out, these spammers are so active, and their technique is so good, that many techniques pitched as being a \u201csolution\u201d did <b>not<\/b> work.<\/p>\n<p>Hell, you\u2019ve probably tried a few of them yourself.<\/p>\n<p>In preparation for this article, I went through my considerable amount of browser bookmarks and my Pocket archive to find all of the guides I had used before prioritizing this in-house fix for our&nbsp;team.<\/p>\n<p>Techniques that do not actually solve this problem include:<\/p>\n<ul>\n<li>Changing your .htcaccess file - This method will not work with advanced tactics. &nbsp;Ghost spam never touches your site therefore renders this method useless.<\/li>\n<li>Using the referral exclusion\/blocking list <em>(<a href=\"http:\/\/www.clairwyant.com\/google-analytics-domain-filtering-spam-bots-ghost-visitors-bad-data\/\" target=\"_blank\" rel=\"noopener noreferrer\">read more<\/a>)<\/em> - Good setup but no updates.<\/li>\n<li>Sourcing exclusion lists into exclusion filters -&nbsp;Only excludes and blocks future spam &amp; does nothing about the referrers from yesteryear.<\/li>\n<\/ul>\n<p>The only one that really came close was the exclusion filter. The real problem there was that it was very difficult to find current and consistently-updated lists. Many of the founders\/creators of such lists just weren\u2019t actually invested in keeping a solution updated.<\/p>\n<p>The constant maintenance required to keep a list like that up is prohibitive to it being an <b>effective<\/b> solution to the problem, especially when there is no profit in doing&nbsp;so.<\/p>\n<h2>The Missing Puzzle Piece<\/h2>\n<p>To be reasonable and effective, a solution to identify and weed out ghost and referral spam traffic would need to&nbsp;be:<\/p>\n<ul>\n<li><b>Very<\/b> regularly updated<\/li>\n<li>Retroactive to past&nbsp;data<\/li>\n<li>Sourced from a large base of&nbsp;data<\/li>\n<\/ul>\n<p>Using those principles as guidelines, we crafted the process that works so well for us&nbsp;now.<\/p>\n<h2>Step 1: Using Segments to Filter and Block&nbsp;Spam<\/h2>\n<p>Just in case you need a refresher:<\/p>\n<ul>\n<li>Filters allow you to include or block data from your reporting data set. Keep in mind that filters are <b>destructive<\/b>. Anything you filter and block, accidentally or otherwise is gone forever. They also cannot edit past&nbsp;data.<\/li>\n<\/ul>\n<ul>\n<li>Segments, on the other hand, are a subset of users or sessions. You can turn segments on and off, as they are not destructive, and can be applied to past&nbsp;data.<\/li>\n<\/ul>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-8790 size-full\" src=\"https:\/\/ahrefs.com\/blog\/wp-content\/uploads\/2015\/11\/image01.png\" alt=\"using segments to filter or block ghost referral spam\" width=\"827\" height=\"627\" srcset=\"https:\/\/ahrefs.com\/blog\/wp-content\/uploads\/2015\/11\/image01.png 827w, https:\/\/ahrefs.com\/blog\/wp-content\/uploads\/2015\/11\/image01-561x425.png 561w\" sizes=\"auto, (max-width: 827px) 100vw, 827px\"><\/p>\n<p>First, I personally <em>(and professionally)<\/em> always prefer to play with segments instead of adding a new filter since segments do not permanently alter your&nbsp;data.<\/p>\n<p>If you mess up while playing with a filter and accidentally filter out real referrers, then that data is never coming back.<\/p>\n<p>Segments also allow to build upon previously used data, and you can apply them <b>retroactively<\/b> as well. No matter how long you\u2019ve left that bad data idling around in your account, you can get it all now with a well-constructed segment.<\/p>\n<h2>Step 2: Maintaining The Exclusion List<\/h2>\n<p>Thanks to the innovative team we\u2019ve got here at the Magistrate, <em>(in particular, our Programmer Josh, who championed building this tool)<\/em>, we took advantage of a tool we use every day, anyways: Slack<\/p>\n<p>The result? A custom integration into our Slack channel that posts every new campaign source from all of our client\u2019s sites every hour. When it arrives, we give it a quick look and either whitelist it or add it the exclusion segment.<\/p>\n<p>It works like&nbsp;this:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-8791 size-full\" src=\"https:\/\/ahrefs.com\/blog\/wp-content\/uploads\/2015\/11\/image08.png\" alt=\"process\" width=\"1570\" height=\"178\" srcset=\"https:\/\/ahrefs.com\/blog\/wp-content\/uploads\/2015\/11\/image08.png 1570w, https:\/\/ahrefs.com\/blog\/wp-content\/uploads\/2015\/11\/image08-680x77.png 680w\" sizes=\"auto, (max-width: 1570px) 100vw, 1570px\"><\/p>\n<ol>\n<li style=\"list-style-type: none;\">\n<ol>\n<li><b>Referrals received<\/b>: For all properties we have control over in&nbsp;GA.<\/li>\n<li><b>Results sorted by count<\/b>: We use PHP to sort, then loop and check if we recognize each. If&nbsp;not\u2026<\/li>\n<li><b>Suspected spam sent to slack channel for judgement<img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-8792\" src=\"https:\/\/ahrefs.com\/blog\/wp-content\/uploads\/2015\/11\/image04.png\" alt=\"image04\" width=\"798\" height=\"66\" srcset=\"https:\/\/ahrefs.com\/blog\/wp-content\/uploads\/2015\/11\/image04.png 798w, https:\/\/ahrefs.com\/blog\/wp-content\/uploads\/2015\/11\/image04-680x56.png 680w\" sizes=\"auto, (max-width: 798px) 100vw, 798px\">after clicking either <i>Blacklist<\/i> or <i>Whitelist<\/i> you\u2019re taken&nbsp;to\u2026<\/b><\/li>\n<li><b>Verdict verified<\/b>: A PHP page contains a confirmation for each classification<\/li>\n<li><b>Spammers Stored<\/b>: verified spammers are locked up in our database until\u2026<\/li>\n<li><b>Data output in regex format<\/b>: We transfer the data and paste it to our analytics account.<\/li>\n<\/ol>\n<\/li>\n<\/ol>\n<p>We\u2019re super proud of this, and it lets us update our list <em>at least<\/em> five times per&nbsp;day.<\/p>\n<h2>Facing Reality: There is No One Solution<\/h2>\n<p>Despite our success\u2014our analytics data is pretty damn clean\u2014we\u2019ve learned along the way that our method and tool should still be supplemented with other techniques, to cover your bases more than anything.<\/p>\n<p>In the end, there is so much spam that we\u2019re only just past the tip of the iceberg. Our data collection is relatively small and&nbsp;young.<\/p>\n<p>Plus, thanks to some friends on inbound, we got some great pointers about solid techniques that also help suppress unwanted spam. The <a href=\"http:\/\/inbound.org\/articles\/view\/referral-spam-solved-give-your-analytics-an-enema\" target=\"_blank\" rel=\"noopener noreferrer\">comments and exchange<\/a> that we had here are well worth a look at for additional context into solving Analytics Spam.<\/p>\n<p>The rest of the steps are relatively easy.<\/p>\n<ol>\n<li>Be sure to turn on the option within Google Analytics to exclude known bots and spiders.<\/li>\n<li>Consider adding an <a href=\"https:\/\/moz.com\/blog\/stop-ghost-spam-in-google-analytics-with-one-filter\" target=\"_blank\" rel=\"noopener noreferrer\">inclusive hostname filter<\/a><\/li>\n<li>You could even <a href=\"http:\/\/www.lunametrics.com\/blog\/2015\/03\/19\/eliminating-dumb-ghost-referral-traffic\/\" target=\"_blank\" rel=\"noopener noreferrer\">add a cookie to your site<\/a> to cover your bases even&nbsp;more<\/li>\n<\/ol>\n<p>Together, you\u2019d get a very clean analytics profile.<\/p>\n<p>Like, \u201cyour house while the in-laws are over\u201d&nbsp;clean.<\/p>\n<p>One contention we\u2019ve gotten during our time creating and promoting our tool, is that many have had success with the inclusive hostname filter, listed above. Though the technique is currently proving <b>mostly effective<\/b>, we\u2019ve found that it\u2019s not the best long-term solution to keeping data&nbsp;clean:<\/p>\n<ul>\n<li>Analytics spam is increasingly spoofing hostnames. It\u2019s not that difficult to do, and is an open window into your&nbsp;data<\/li>\n<li>Setup this option incorrectly, and you\u2019re potentially filtering out real data <em>(see filters vs. segments)<\/em><\/li>\n<\/ul>\n<p>We\u2019ve never quite seen hostname filters work 100% because of this vulnerability. We feel like our tool is finally the complete solution since it doesn\u2019t discriminate by what means the spam referrer ended up in our GA account, it just stops it dead in its tracks.<\/p>\n<div style=\"background: #b1d6fe; padding: 15px;\">\n<p><strong>Editor\u2019s note:<\/strong> I asked Alex why the exclusion list was required in addition to the inclusive hostname filter <em>(which I have personally implemented on my sites)<\/em>. His answer was as above - while the inclusive hostname filter is pretty effective, there are sites that slip through the net <em>(and the spammers are getting smarter)<\/em>. When I checked my own analytics he was absolutely right as you can see&nbsp;below:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-8803 size-full\" src=\"https:\/\/ahrefs.com\/blog\/wp-content\/uploads\/2015\/11\/ghost-referral.jpg\" alt=\"ghost referral spam still slips through the net\" width=\"395\" height=\"146\"><\/p>\n<p>So as Alex says, a combination of both methods will be most effective in eliminating all ghost referrals and keeping your analytics clean.<\/p>\n<\/div>\n<p>At this point, an honest person would admit, setting up all of these solutions together is also a lot of work. I know about all the solutions, have documented them thoroughly and still don\u2019t implement them all on sites I control. &nbsp;A solution that never gets implemented is no solution at&nbsp;all.<\/p>\n<p>And that is why we feel like this is finally a <b>complete<\/b> solution.<\/p>\n<h2>Moving Forward<\/h2>\n<p>Again, it\u2019s hard to stay 100% ahead of the&nbsp;curve.<\/p>\n<p>But, if you need a robust and QUICK tool <em>(done in a minute, literally)<\/em> that is well-maintained, we\u2019ve put an easy to use tool for you. It\u2019ll only cost an email address, and we\u2019re invested in keeping it updated.<\/p>\n<p>Here is our <a href=\"https:\/\/loganix.net\/rst-lander\/\" target=\"_blank\" rel=\"noopener noreferrer\">referral spam cleanup tool<\/a>, and let me quickly walk you through it.<\/p>\n<p>After going through the double opt-in, you\u2019ll arrive at the form below. Select any view to apply to all of your Analytics accounts and&nbsp;views.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-8793 size-full\" src=\"https:\/\/ahrefs.com\/blog\/wp-content\/uploads\/2015\/11\/image05.png\" alt=\"segment shared\" width=\"575\" height=\"277\"><\/p>\n<p>Then, apply the segment in any of your reporting views. It\u2019s useful to compare it with all sessions, depending on what you\u2019re reporting on.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-8794 size-full\" src=\"https:\/\/ahrefs.com\/blog\/wp-content\/uploads\/2015\/11\/image12.png\" alt=\"adding the loganix segment\" width=\"1084\" height=\"264\" srcset=\"https:\/\/ahrefs.com\/blog\/wp-content\/uploads\/2015\/11\/image12.png 1084w, https:\/\/ahrefs.com\/blog\/wp-content\/uploads\/2015\/11\/image12-680x166.png 680w\" sizes=\"auto, (max-width: 1084px) 100vw, 1084px\"><\/p>\n<p>When that\u2019s done, simply view the graph to get an idea of how much you were able to clean up your data. In this case, spam constituted over 20% of the data collected in Analytics. Blue is data as collected previously, and orange is the data once adjusted to remove spammy visits.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-8795 size-full\" src=\"https:\/\/ahrefs.com\/blog\/wp-content\/uploads\/2015\/11\/image10.png\" alt=\"snapshot of google analytics with segment in place\" width=\"806\" height=\"556\" srcset=\"https:\/\/ahrefs.com\/blog\/wp-content\/uploads\/2015\/11\/image10.png 806w, https:\/\/ahrefs.com\/blog\/wp-content\/uploads\/2015\/11\/image10-616x425.png 616w\" sizes=\"auto, (max-width: 806px) 100vw, 806px\"><\/p>\n<p>And hey, if you\u2019re finding a bad guy that hasn\u2019t quite reached us yet, you can suggest that the spammers be added to the segment\u2019s blacklist.<\/p>\n<p>Again, this is an ever-evolving problem for us. If it is for you too, we want your&nbsp;input.<\/p>\n<p>This would have never been possible without our team, and we think it can be even better with you&nbsp;too.<\/p>\n<p>If you have any tips and tricks we\u2019ve missed, I hope you\u2019ll let us know. In the meantime, <a href=\"https:\/\/loganix.net\/rst-lander\" target=\"_blank\" rel=\"noopener noreferrer\">enjoy our tool<\/a> and cheers!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Is ghost referral spam screwing up your Google analytics data? Fed up seeing spammy sites like darodar, semalt, floating-share-buttons.com and www.event-tracking.com in your list of referrers? Well, you\u2019re not&nbsp;alone. Referral spam is the bain of most webmasters at the moment<span class=\"ellipsis\">\u2026<\/span><\/p>\n<div class=\"read-more\">Read more \u203a<\/div>\n<p><!-- end of .read-more --><\/p>\n","protected":false},"author":94,"featured_media":8779,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"wp_typography_post_enhancements_disabled":false,"footnotes":""},"categories":[335],"tags":[],"coauthors":[361],"class_list":["post-8775","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-general-seo","odd"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.3 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>How To Stop Referral Spam In Google Analytics<\/title>\n<meta name=\"description\" content=\"Completely eliminate ghost referral spam from your Google analytics and clean up your reports by following the steps in our guide.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/ahrefs.com\/blog\/referral-spam\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How To Stop Referral Spam In Google Analytics\" \/>\n<meta property=\"og:description\" content=\"Completely eliminate ghost referral spam from your Google analytics and clean up your reports by following the steps in our guide.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/ahrefs.com\/blog\/referral-spam\/\" \/>\n<meta property=\"og:site_name\" content=\"SEO Blog by Ahrefs\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/Ahrefs\/\" \/>\n<meta property=\"article:author\" content=\"loganixcitationbuilding\/\" \/>\n<meta property=\"article:published_time\" content=\"2015-11-12T21:06:53+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2021-06-29T21:05:10+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/ahrefs.com\/blog\/wp-content\/uploads\/2015\/11\/image11.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1200\" \/>\n\t<meta property=\"og:image:height\" content=\"627\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Alex Dealy\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@adealyvidal\" \/>\n<meta name=\"twitter:site\" content=\"@ahrefs\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/ahrefs.com\\\/blog\\\/referral-spam\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/ahrefs.com\\\/blog\\\/referral-spam\\\/\"},\"author\":{\"name\":\"Alex Dealy\",\"@id\":\"https:\\\/\\\/ahrefs.com\\\/blog\\\/#\\\/schema\\\/person\\\/8ccbb730565a9a464912e373764fbf73\"},\"headline\":\"An Actionable Guide To Stopping Referral Spam In Google Analytics\",\"datePublished\":\"2015-11-12T21:06:53+00:00\",\"dateModified\":\"2021-06-29T21:05:10+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/ahrefs.com\\\/blog\\\/referral-spam\\\/\"},\"wordCount\":2116,\"commentCount\":8,\"publisher\":{\"@id\":\"https:\\\/\\\/ahrefs.com\\\/blog\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/ahrefs.com\\\/blog\\\/referral-spam\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/ahrefs.com\\\/blog\\\/wp-content\\\/uploads\\\/2015\\\/11\\\/image11.jpg\",\"articleSection\":[\"General SEO\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/ahrefs.com\\\/blog\\\/referral-spam\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/ahrefs.com\\\/blog\\\/referral-spam\\\/\",\"url\":\"https:\\\/\\\/ahrefs.com\\\/blog\\\/referral-spam\\\/\",\"name\":\"How To Stop Referral Spam In Google Analytics\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/ahrefs.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/ahrefs.com\\\/blog\\\/referral-spam\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/ahrefs.com\\\/blog\\\/referral-spam\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/ahrefs.com\\\/blog\\\/wp-content\\\/uploads\\\/2015\\\/11\\\/image11.jpg\",\"datePublished\":\"2015-11-12T21:06:53+00:00\",\"dateModified\":\"2021-06-29T21:05:10+00:00\",\"description\":\"Completely eliminate ghost referral spam from your Google analytics and clean up your reports by following the steps in our guide.\",\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/ahrefs.com\\\/blog\\\/referral-spam\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/ahrefs.com\\\/blog\\\/referral-spam\\\/#primaryimage\",\"url\":\"https:\\\/\\\/ahrefs.com\\\/blog\\\/wp-content\\\/uploads\\\/2015\\\/11\\\/image11.jpg\",\"contentUrl\":\"https:\\\/\\\/ahrefs.com\\\/blog\\\/wp-content\\\/uploads\\\/2015\\\/11\\\/image11.jpg\",\"width\":1200,\"height\":627},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/ahrefs.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/ahrefs.com\\\/blog\\\/\",\"name\":\"SEO Blog by Ahrefs\",\"description\":\"Link Building Strategies &amp; SEO Tips\",\"publisher\":{\"@id\":\"https:\\\/\\\/ahrefs.com\\\/blog\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/ahrefs.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/ahrefs.com\\\/blog\\\/#organization\",\"name\":\"Ahrefs\",\"url\":\"https:\\\/\\\/ahrefs.com\\\/blog\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/ahrefs.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/ahrefs.com\\\/blog\\\/wp-content\\\/uploads\\\/2023\\\/06\\\/ahrefs-logo.png\",\"contentUrl\":\"https:\\\/\\\/ahrefs.com\\\/blog\\\/wp-content\\\/uploads\\\/2023\\\/06\\\/ahrefs-logo.png\",\"width\":2048,\"height\":768,\"caption\":\"Ahrefs\"},\"image\":{\"@id\":\"https:\\\/\\\/ahrefs.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/Ahrefs\\\/\",\"https:\\\/\\\/x.com\\\/ahrefs\",\"https:\\\/\\\/www.linkedin.com\\\/company\\\/ahrefs\\\/\",\"https:\\\/\\\/www.youtube.com\\\/c\\\/ahrefscom\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/ahrefs.com\\\/blog\\\/#\\\/schema\\\/person\\\/8ccbb730565a9a464912e373764fbf73\",\"name\":\"Alex Dealy\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/cf1e0c0fa1cf0f6151d6afb6194fdd1d7471b7b412e55f298f1cffa20e56642d?s=96&d=mm&r=gbabc4dc9ee7279da424042b0a201ea85\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/cf1e0c0fa1cf0f6151d6afb6194fdd1d7471b7b412e55f298f1cffa20e56642d?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/cf1e0c0fa1cf0f6151d6afb6194fdd1d7471b7b412e55f298f1cffa20e56642d?s=96&d=mm&r=g\",\"caption\":\"Alex Dealy\"},\"description\":\"Alex Dealy is Alex is the Search Director at The Magistrate and Loganix. Powered by resourcefulness and strong processes, Alex has built himself into a full-time digital nomad and is now into his fourth year living and working in South America.\",\"sameAs\":[\"https:\\\/\\\/loganix.net\",\"loganixcitationbuilding\\\/\",\"alexdealy\",\"https:\\\/\\\/x.com\\\/adealyvidal\"],\"url\":\"https:\\\/\\\/ahrefs.com\\\/blog\\\/author\\\/alex-dealy\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How To Stop Referral Spam In Google Analytics","description":"Completely eliminate ghost referral spam from your Google analytics and clean up your reports by following the steps in our guide.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/ahrefs.com\/blog\/referral-spam\/","og_locale":"en_US","og_type":"article","og_title":"How To Stop Referral Spam In Google Analytics","og_description":"Completely eliminate ghost referral spam from your Google analytics and clean up your reports by following the steps in our guide.","og_url":"https:\/\/ahrefs.com\/blog\/referral-spam\/","og_site_name":"SEO Blog by Ahrefs","article_publisher":"https:\/\/www.facebook.com\/Ahrefs\/","article_author":"loganixcitationbuilding\/","article_published_time":"2015-11-12T21:06:53+00:00","article_modified_time":"2021-06-29T21:05:10+00:00","og_image":[{"width":1200,"height":627,"url":"https:\/\/ahrefs.com\/blog\/wp-content\/uploads\/2015\/11\/image11.jpg","type":"image\/jpeg"}],"author":"Alex Dealy","twitter_card":"summary_large_image","twitter_creator":"@adealyvidal","twitter_site":"@ahrefs","schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/ahrefs.com\/blog\/referral-spam\/#article","isPartOf":{"@id":"https:\/\/ahrefs.com\/blog\/referral-spam\/"},"author":{"name":"Alex Dealy","@id":"https:\/\/ahrefs.com\/blog\/#\/schema\/person\/8ccbb730565a9a464912e373764fbf73"},"headline":"An Actionable Guide To Stopping Referral Spam In Google Analytics","datePublished":"2015-11-12T21:06:53+00:00","dateModified":"2021-06-29T21:05:10+00:00","mainEntityOfPage":{"@id":"https:\/\/ahrefs.com\/blog\/referral-spam\/"},"wordCount":2116,"commentCount":8,"publisher":{"@id":"https:\/\/ahrefs.com\/blog\/#organization"},"image":{"@id":"https:\/\/ahrefs.com\/blog\/referral-spam\/#primaryimage"},"thumbnailUrl":"https:\/\/ahrefs.com\/blog\/wp-content\/uploads\/2015\/11\/image11.jpg","articleSection":["General SEO"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/ahrefs.com\/blog\/referral-spam\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/ahrefs.com\/blog\/referral-spam\/","url":"https:\/\/ahrefs.com\/blog\/referral-spam\/","name":"How To Stop Referral Spam In Google Analytics","isPartOf":{"@id":"https:\/\/ahrefs.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/ahrefs.com\/blog\/referral-spam\/#primaryimage"},"image":{"@id":"https:\/\/ahrefs.com\/blog\/referral-spam\/#primaryimage"},"thumbnailUrl":"https:\/\/ahrefs.com\/blog\/wp-content\/uploads\/2015\/11\/image11.jpg","datePublished":"2015-11-12T21:06:53+00:00","dateModified":"2021-06-29T21:05:10+00:00","description":"Completely eliminate ghost referral spam from your Google analytics and clean up your reports by following the steps in our guide.","inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/ahrefs.com\/blog\/referral-spam\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/ahrefs.com\/blog\/referral-spam\/#primaryimage","url":"https:\/\/ahrefs.com\/blog\/wp-content\/uploads\/2015\/11\/image11.jpg","contentUrl":"https:\/\/ahrefs.com\/blog\/wp-content\/uploads\/2015\/11\/image11.jpg","width":1200,"height":627},{"@type":"WebSite","@id":"https:\/\/ahrefs.com\/blog\/#website","url":"https:\/\/ahrefs.com\/blog\/","name":"SEO Blog by Ahrefs","description":"Link Building Strategies &amp; SEO Tips","publisher":{"@id":"https:\/\/ahrefs.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/ahrefs.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/ahrefs.com\/blog\/#organization","name":"Ahrefs","url":"https:\/\/ahrefs.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/ahrefs.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/ahrefs.com\/blog\/wp-content\/uploads\/2023\/06\/ahrefs-logo.png","contentUrl":"https:\/\/ahrefs.com\/blog\/wp-content\/uploads\/2023\/06\/ahrefs-logo.png","width":2048,"height":768,"caption":"Ahrefs"},"image":{"@id":"https:\/\/ahrefs.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/Ahrefs\/","https:\/\/x.com\/ahrefs","https:\/\/www.linkedin.com\/company\/ahrefs\/","https:\/\/www.youtube.com\/c\/ahrefscom"]},{"@type":"Person","@id":"https:\/\/ahrefs.com\/blog\/#\/schema\/person\/8ccbb730565a9a464912e373764fbf73","name":"Alex Dealy","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/cf1e0c0fa1cf0f6151d6afb6194fdd1d7471b7b412e55f298f1cffa20e56642d?s=96&d=mm&r=gbabc4dc9ee7279da424042b0a201ea85","url":"https:\/\/secure.gravatar.com\/avatar\/cf1e0c0fa1cf0f6151d6afb6194fdd1d7471b7b412e55f298f1cffa20e56642d?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/cf1e0c0fa1cf0f6151d6afb6194fdd1d7471b7b412e55f298f1cffa20e56642d?s=96&d=mm&r=g","caption":"Alex Dealy"},"description":"Alex Dealy is Alex is the Search Director at The Magistrate and Loganix. Powered by resourcefulness and strong processes, Alex has built himself into a full-time digital nomad and is now into his fourth year living and working in South America.","sameAs":["https:\/\/loganix.net","loganixcitationbuilding\/","alexdealy","https:\/\/x.com\/adealyvidal"],"url":"https:\/\/ahrefs.com\/blog\/author\/alex-dealy\/"}]}},"_links":{"self":[{"href":"https:\/\/ahrefs.com\/blog\/wp-json\/wp\/v2\/posts\/8775","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ahrefs.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ahrefs.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ahrefs.com\/blog\/wp-json\/wp\/v2\/users\/94"}],"replies":[{"embeddable":true,"href":"https:\/\/ahrefs.com\/blog\/wp-json\/wp\/v2\/comments?post=8775"}],"version-history":[{"count":0,"href":"https:\/\/ahrefs.com\/blog\/wp-json\/wp\/v2\/posts\/8775\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/ahrefs.com\/blog\/wp-json\/wp\/v2\/media\/8779"}],"wp:attachment":[{"href":"https:\/\/ahrefs.com\/blog\/wp-json\/wp\/v2\/media?parent=8775"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ahrefs.com\/blog\/wp-json\/wp\/v2\/categories?post=8775"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ahrefs.com\/blog\/wp-json\/wp\/v2\/tags?post=8775"},{"taxonomy":"author","embeddable":true,"href":"https:\/\/ahrefs.com\/blog\/wp-json\/wp\/v2\/coauthors?post=8775"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}