{"id":2164,"date":"2016-12-01T10:49:10","date_gmt":"2016-12-01T07:49:10","guid":{"rendered":"http:\/\/www.coding-dude.com\/wp\/?p=2164"},"modified":"2018-07-06T18:09:50","modified_gmt":"2018-07-06T15:09:50","slug":"how-to-block-referral-traffic-in-google-analytics","status":"publish","type":"post","link":"https:\/\/www.coding-dude.com\/wp\/seo\/how-to-block-referral-traffic-in-google-analytics\/","title":{"rendered":"How to Block Referral Traffic in Google Analytics"},"content":{"rendered":"<div class=\"9db0862b9cf2e44f8d962262c5a80491\" data-index=\"1\" style=\"float: none; margin:10px 0 10px 0; text-align:center;\">\n<script type=\"text\/javascript\"><!--\r\ngoogle_ad_client = \"ca-pub-3421619882899259\";\r\n\/* Coding Dude Medium Banner *\/\r\ngoogle_ad_slot = \"2969896483\";\r\ngoogle_ad_width = 468;\r\ngoogle_ad_height = 60;\r\n\/\/-->\r\n<\/script>\r\n<script type=\"text\/javascript\"\r\nsrc=\"\/\/pagead2.googlesyndication.com\/pagead\/show_ads.js\">\r\n<\/script>\n<\/div>\n<p>Looking at my Google Analytics data I noticed a relative increase in traffic on coding-dude.com during the November 2016. I tried to find out where this traffic came from and the referral overview showed all sort of dubious websites like abc.xyz and\u00a0lifehac\u0138er.com (notice the &#8220;\u0138&#8221; character as oposed to k). Of course this is not real traffic and it&#8217;s part of some black hat SEO techniques meant to drive traffic to these shady sites. The websites are stuffed with links and meaningless content.<\/p>\n<p>This technique is called <span style=\"text-decoration: underline;\">referral spam<\/span> and after searching the net a bit I realized that the problem is extremely wide spread reaching websites as big as thenextweb.com. It&#8217;s source is actually a Russian hacker that managed to create a piece of code that feeds data directly into the Google Analytics endpoints. The purpose is to make web masters access these sites while trying to investigate how traffic is coming from them and therefore generating traffic on the spam websites.<\/p>\n<p>So how do we block referral traffic in Google Analytics to avoid inclusion of spam referral?<\/p>\n<h2>Who is this post for?<\/h2>\n<p>I&#8217;ve written this post for web masters or blog admins like myself who want to get real traffic data from Google Analytics reports and block spam data. That is, for webmasters that want to filter out any referral spam information and more specifically filter out abc.xyz or\u00a0lifehac\u0138er.com (lifehacker.com) from the Google Analytics reports. Here&#8217;s a sample from my Google Analytics referrals overview where you can easily spot the spammers:<\/p>\n<p><a href=\"\/\/www.coding-dude.com\/wp\/wp-content\/uploads\/2016\/11\/google-analytics-spam.png\"><img fetchpriority=\"high\" decoding=\"async\" class=\"aligncenter size-large wp-image-2167\" src=\"\/\/www.coding-dude.com\/wp\/wp-content\/uploads\/2016\/11\/google-analytics-spam-1024x459.png\" alt=\"google analytics spammers\" width=\"1024\" height=\"459\" srcset=\"https:\/\/www.coding-dude.com\/wp\/wp-content\/uploads\/2016\/11\/google-analytics-spam-1024x459.png 1024w, https:\/\/www.coding-dude.com\/wp\/wp-content\/uploads\/2016\/11\/google-analytics-spam-300x135.png 300w, https:\/\/www.coding-dude.com\/wp\/wp-content\/uploads\/2016\/11\/google-analytics-spam-768x345.png 768w, https:\/\/www.coding-dude.com\/wp\/wp-content\/uploads\/2016\/11\/google-analytics-spam.png 1119w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><\/p>\n<h2>Is Google Analytics Spam Affecting My Website Rankings?<\/h2>\n<p>The short answer is NO. There is no negative impact on your website rankings, however, because Google Analytics data is polluted by this spam it will be more difficult to get an overview of the real traffic on your website.<\/p>\n<p>So my opinion would be to somehow remove this spam data from the Google Analytics reports, but how do we do that? See below my proposed solution.<\/p>\n<h2>How Do I Remove Referral Spam From My Google Analytics Data?<\/h2>\n<p>Since this kind of spam goes directly to Google Analytics there is not much you can do on your website to stop it. However, what you can do is filter out spam referrals from the Google Analytics data. In order to do that you need to create a filter in your Google Analytics.<\/p>\n<p>First go to\u00a0<strong>Admin<\/strong> and select\u00a0<strong>Account &gt; Property &gt; View &gt; Filter<\/strong>.<\/p>\n<p><a href=\"\/\/www.coding-dude.com\/wp\/wp-content\/uploads\/2016\/12\/define-google-analytics-filter.png\"><img decoding=\"async\" class=\"aligncenter size-large wp-image-2171\" src=\"\/\/www.coding-dude.com\/wp\/wp-content\/uploads\/2016\/12\/define-google-analytics-filter-1024x416.png\" alt=\"define google analytics filter\" width=\"1024\" height=\"416\" srcset=\"https:\/\/www.coding-dude.com\/wp\/wp-content\/uploads\/2016\/12\/define-google-analytics-filter-1024x416.png 1024w, https:\/\/www.coding-dude.com\/wp\/wp-content\/uploads\/2016\/12\/define-google-analytics-filter-300x122.png 300w, https:\/\/www.coding-dude.com\/wp\/wp-content\/uploads\/2016\/12\/define-google-analytics-filter-768x312.png 768w, https:\/\/www.coding-dude.com\/wp\/wp-content\/uploads\/2016\/12\/define-google-analytics-filter.png 1241w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><\/p>\n<p>Define a new filter by pressing the\u00a0<strong>Add Filter\u00a0<\/strong>button.<\/p>\n<p><a href=\"\/\/www.coding-dude.com\/wp\/wp-content\/uploads\/2016\/12\/add-google-analytics-filter.png\"><img decoding=\"async\" class=\"aligncenter size-full wp-image-2173\" src=\"\/\/www.coding-dude.com\/wp\/wp-content\/uploads\/2016\/12\/add-google-analytics-filter.png\" alt=\"add google analytics filter\" width=\"551\" height=\"276\" srcset=\"https:\/\/www.coding-dude.com\/wp\/wp-content\/uploads\/2016\/12\/add-google-analytics-filter.png 551w, https:\/\/www.coding-dude.com\/wp\/wp-content\/uploads\/2016\/12\/add-google-analytics-filter-300x150.png 300w\" sizes=\"(max-width: 551px) 100vw, 551px\" \/><\/a><\/p>\n<p>Give the filter a name, choose\u00a0<strong>Custom<\/strong> as the\u00a0<strong>Filter Type<\/strong>. Then check the\u00a0<strong>Exclude<\/strong>\u00a0box and choose <strong>Referral<\/strong> in the\u00a0<strong>Filter Field<\/strong>. So, we are defining a filter to exclude all referrals matching a certain string. The string is a regular expression. Since we want to exclude all incoming traffic from\u00a0<code>.xyz<\/code> and the <code>lifehacker.com<\/code> sites the regular expression will look like\u00a0<code>.*\\.xyz|.*lifehac.er.com<\/code>.<\/p>\n<p><a href=\"\/\/www.coding-dude.com\/wp\/wp-content\/uploads\/2016\/12\/referral-spam-google-analytics-filter-regex.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-2174\" src=\"\/\/www.coding-dude.com\/wp\/wp-content\/uploads\/2016\/12\/referral-spam-google-analytics-filter-regex.png\" alt=\"referral spam google analytics filter regex\" width=\"721\" height=\"523\" srcset=\"https:\/\/www.coding-dude.com\/wp\/wp-content\/uploads\/2016\/12\/referral-spam-google-analytics-filter-regex.png 721w, https:\/\/www.coding-dude.com\/wp\/wp-content\/uploads\/2016\/12\/referral-spam-google-analytics-filter-regex-300x218.png 300w\" sizes=\"(max-width: 721px) 100vw, 721px\" \/><\/a><\/p>\n<p><del><\/del>Save the filter and you are done.<\/p>\n<h2>Why do I still see spam traffic in my Google Analytics<\/h2>\n<p>As I&#8217;ve later found out, the xyz and lifehacker spam technique is not the only one used by spammers. In my case I had to also add another filter based on the user language identifier.<\/p>\n<p>Every visit to your site is tracked by Google Analytics by the use of a tracking number associated with the user visiting your site. Attached to the user id are all sort of information including which is the language of the user.<\/p>\n<p>Apparently the spammers have found a way to feed a fake identifier as the language id which in my case looked like this:<\/p>\n<p><code>\"Secret.\u0262oogle.com You are invited! Enter only with this ticket URL. Copy it. Vote for Trump!\"<\/code><\/p>\n<p>I had to add an extra filter the same way as described above, but this time in the\u00a0<strong>Filter Field<\/strong> I chose\u00a0<strong>Language Settings<\/strong> with the filter pattern\u00a0<code>\u0262oogle|o\\-o.com<\/code>.<\/p>\n<p><a href=\"\/\/www.coding-dude.com\/wp\/wp-content\/uploads\/2016\/12\/google-analytics-language-spam-filter.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-2179\" src=\"\/\/www.coding-dude.com\/wp\/wp-content\/uploads\/2016\/12\/google-analytics-language-spam-filter.png\" alt=\"google analytics language spam filter\" width=\"410\" height=\"393\" srcset=\"https:\/\/www.coding-dude.com\/wp\/wp-content\/uploads\/2016\/12\/google-analytics-language-spam-filter.png 410w, https:\/\/www.coding-dude.com\/wp\/wp-content\/uploads\/2016\/12\/google-analytics-language-spam-filter-300x288.png 300w\" sizes=\"(max-width: 410px) 100vw, 410px\" \/><\/a><\/p>\n<h2>Congratulatulations, You Have Now Blocked Referral Spam in Your Google Analytics Reports<\/h2>\n<p>The filter is setup and you will no longer see the spam data in your Google Analytics data. Please note that the filter does not apply for past data, but future data will block referral traffic in Google Analytics coming from the spam websites.<\/p>\n<p>Hope you found this post useful. Spread the word, since the only way to stop this kind of spam attacks is to have well informed web masters that would render useless these kind of attempts.<\/p>\n<p>&nbsp;<\/p>\n<!--CusAds0-->\n<div style=\"font-size: 0px; height: 0px; line-height: 0px; margin: 0; padding: 0; clear: both;\"><\/div>","protected":false},"excerpt":{"rendered":"<p>Looking at my Google Analytics data I noticed a relative increase in traffic on coding-dude.com during the November 2016. I tried to find out where this traffic came from and the referral overview showed all sort of dubious websites like abc.xyz and\u00a0lifehac\u0138er.com (notice the &#8220;\u0138&#8221; character as oposed to k). Of course this is not [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":2167,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[117],"tags":[199,201,203],"class_list":["post-2164","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-seo","tag-google-analytics-en","tag-regex-en","tag-spam-en"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.3 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>How to Block Referral Traffic in Google Analytics<\/title>\n<meta name=\"description\" content=\"So how do we block referral traffic in Google Analytics to avoid inclusion of spam referral? Dubious referral websites like abc.xyz and lifehac\u0138er.com\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.coding-dude.com\/wp\/seo\/how-to-block-referral-traffic-in-google-analytics\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Block Referral Traffic in Google Analytics\" \/>\n<meta property=\"og:description\" content=\"So how do we block referral traffic in Google Analytics to avoid inclusion of spam referral? Dubious referral websites like abc.xyz and lifehac\u0138er.com\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.coding-dude.com\/wp\/seo\/how-to-block-referral-traffic-in-google-analytics\/\" \/>\n<meta property=\"og:site_name\" content=\"Coding Dude\" \/>\n<meta property=\"article:published_time\" content=\"2016-12-01T07:49:10+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2018-07-06T15:09:50+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.coding-dude.com\/wp\/wp-content\/uploads\/2016\/11\/google-analytics-spam.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1119\" \/>\n\t<meta property=\"og:image:height\" content=\"502\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"John Negoita\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@codingdudecom\" \/>\n<meta name=\"twitter:site\" content=\"@codingdudecom\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"John Negoita\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.coding-dude.com\\\/wp\\\/seo\\\/how-to-block-referral-traffic-in-google-analytics\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.coding-dude.com\\\/wp\\\/seo\\\/how-to-block-referral-traffic-in-google-analytics\\\/\"},\"author\":{\"name\":\"John Negoita\",\"@id\":\"https:\\\/\\\/www.coding-dude.com\\\/wp\\\/#\\\/schema\\\/person\\\/29b7100b9ec7bb332359bd9fcba98370\"},\"headline\":\"How to Block Referral Traffic in Google Analytics\",\"datePublished\":\"2016-12-01T07:49:10+00:00\",\"dateModified\":\"2018-07-06T15:09:50+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.coding-dude.com\\\/wp\\\/seo\\\/how-to-block-referral-traffic-in-google-analytics\\\/\"},\"wordCount\":731,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/www.coding-dude.com\\\/wp\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.coding-dude.com\\\/wp\\\/seo\\\/how-to-block-referral-traffic-in-google-analytics\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.coding-dude.com\\\/wp\\\/wp-content\\\/uploads\\\/2016\\\/11\\\/google-analytics-spam.png\",\"keywords\":[\"google analytics\",\"regex\",\"spam\"],\"articleSection\":[\"SEO\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.coding-dude.com\\\/wp\\\/seo\\\/how-to-block-referral-traffic-in-google-analytics\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.coding-dude.com\\\/wp\\\/seo\\\/how-to-block-referral-traffic-in-google-analytics\\\/\",\"url\":\"https:\\\/\\\/www.coding-dude.com\\\/wp\\\/seo\\\/how-to-block-referral-traffic-in-google-analytics\\\/\",\"name\":\"How to Block Referral Traffic in Google Analytics\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.coding-dude.com\\\/wp\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.coding-dude.com\\\/wp\\\/seo\\\/how-to-block-referral-traffic-in-google-analytics\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.coding-dude.com\\\/wp\\\/seo\\\/how-to-block-referral-traffic-in-google-analytics\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.coding-dude.com\\\/wp\\\/wp-content\\\/uploads\\\/2016\\\/11\\\/google-analytics-spam.png\",\"datePublished\":\"2016-12-01T07:49:10+00:00\",\"dateModified\":\"2018-07-06T15:09:50+00:00\",\"description\":\"So how do we block referral traffic in Google Analytics to avoid inclusion of spam referral? Dubious referral websites like abc.xyz and lifehac\u0138er.com\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.coding-dude.com\\\/wp\\\/seo\\\/how-to-block-referral-traffic-in-google-analytics\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.coding-dude.com\\\/wp\\\/seo\\\/how-to-block-referral-traffic-in-google-analytics\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.coding-dude.com\\\/wp\\\/seo\\\/how-to-block-referral-traffic-in-google-analytics\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.coding-dude.com\\\/wp\\\/wp-content\\\/uploads\\\/2016\\\/11\\\/google-analytics-spam.png\",\"contentUrl\":\"https:\\\/\\\/www.coding-dude.com\\\/wp\\\/wp-content\\\/uploads\\\/2016\\\/11\\\/google-analytics-spam.png\",\"width\":1119,\"height\":502,\"caption\":\"google analytics spammers\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.coding-dude.com\\\/wp\\\/seo\\\/how-to-block-referral-traffic-in-google-analytics\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.coding-dude.com\\\/wp\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to Block Referral Traffic in Google Analytics\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.coding-dude.com\\\/wp\\\/#website\",\"url\":\"https:\\\/\\\/www.coding-dude.com\\\/wp\\\/\",\"name\":\"Coding Dude\",\"description\":\"Coding tutorials, tips and tricks\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.coding-dude.com\\\/wp\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.coding-dude.com\\\/wp\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.coding-dude.com\\\/wp\\\/#organization\",\"name\":\"Coding Dude\",\"url\":\"https:\\\/\\\/www.coding-dude.com\\\/wp\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.coding-dude.com\\\/wp\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.coding-dude.com\\\/wp\\\/wp-content\\\/uploads\\\/2018\\\/05\\\/codingdude-logo-wide.jpg\",\"contentUrl\":\"https:\\\/\\\/www.coding-dude.com\\\/wp\\\/wp-content\\\/uploads\\\/2018\\\/05\\\/codingdude-logo-wide.jpg\",\"width\":226,\"height\":60,\"caption\":\"Coding Dude\"},\"image\":{\"@id\":\"https:\\\/\\\/www.coding-dude.com\\\/wp\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/x.com\\\/codingdudecom\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.coding-dude.com\\\/wp\\\/#\\\/schema\\\/person\\\/29b7100b9ec7bb332359bd9fcba98370\",\"name\":\"John Negoita\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/d51d5d54d4c51f0a7bfe39333bd98cfc5245ab49433be692fce26b741c08181e?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/d51d5d54d4c51f0a7bfe39333bd98cfc5245ab49433be692fce26b741c08181e?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/d51d5d54d4c51f0a7bfe39333bd98cfc5245ab49433be692fce26b741c08181e?s=96&d=mm&r=g\",\"caption\":\"John Negoita\"},\"description\":\"I'm a Java programmer, been into programming since 1999 and having tons of fun with it.\",\"sameAs\":[\"http:\\\/\\\/www.coding-dude.com\",\"https:\\\/\\\/x.com\\\/codingdudecom\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to Block Referral Traffic in Google Analytics","description":"So how do we block referral traffic in Google Analytics to avoid inclusion of spam referral? Dubious referral websites like abc.xyz and lifehac\u0138er.com","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:\/\/www.coding-dude.com\/wp\/seo\/how-to-block-referral-traffic-in-google-analytics\/","og_locale":"en_US","og_type":"article","og_title":"How to Block Referral Traffic in Google Analytics","og_description":"So how do we block referral traffic in Google Analytics to avoid inclusion of spam referral? Dubious referral websites like abc.xyz and lifehac\u0138er.com","og_url":"https:\/\/www.coding-dude.com\/wp\/seo\/how-to-block-referral-traffic-in-google-analytics\/","og_site_name":"Coding Dude","article_published_time":"2016-12-01T07:49:10+00:00","article_modified_time":"2018-07-06T15:09:50+00:00","og_image":[{"width":1119,"height":502,"url":"https:\/\/www.coding-dude.com\/wp\/wp-content\/uploads\/2016\/11\/google-analytics-spam.png","type":"image\/png"}],"author":"John Negoita","twitter_card":"summary_large_image","twitter_creator":"@codingdudecom","twitter_site":"@codingdudecom","twitter_misc":{"Written by":"John Negoita","Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.coding-dude.com\/wp\/seo\/how-to-block-referral-traffic-in-google-analytics\/#article","isPartOf":{"@id":"https:\/\/www.coding-dude.com\/wp\/seo\/how-to-block-referral-traffic-in-google-analytics\/"},"author":{"name":"John Negoita","@id":"https:\/\/www.coding-dude.com\/wp\/#\/schema\/person\/29b7100b9ec7bb332359bd9fcba98370"},"headline":"How to Block Referral Traffic in Google Analytics","datePublished":"2016-12-01T07:49:10+00:00","dateModified":"2018-07-06T15:09:50+00:00","mainEntityOfPage":{"@id":"https:\/\/www.coding-dude.com\/wp\/seo\/how-to-block-referral-traffic-in-google-analytics\/"},"wordCount":731,"commentCount":0,"publisher":{"@id":"https:\/\/www.coding-dude.com\/wp\/#organization"},"image":{"@id":"https:\/\/www.coding-dude.com\/wp\/seo\/how-to-block-referral-traffic-in-google-analytics\/#primaryimage"},"thumbnailUrl":"https:\/\/www.coding-dude.com\/wp\/wp-content\/uploads\/2016\/11\/google-analytics-spam.png","keywords":["google analytics","regex","spam"],"articleSection":["SEO"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.coding-dude.com\/wp\/seo\/how-to-block-referral-traffic-in-google-analytics\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.coding-dude.com\/wp\/seo\/how-to-block-referral-traffic-in-google-analytics\/","url":"https:\/\/www.coding-dude.com\/wp\/seo\/how-to-block-referral-traffic-in-google-analytics\/","name":"How to Block Referral Traffic in Google Analytics","isPartOf":{"@id":"https:\/\/www.coding-dude.com\/wp\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.coding-dude.com\/wp\/seo\/how-to-block-referral-traffic-in-google-analytics\/#primaryimage"},"image":{"@id":"https:\/\/www.coding-dude.com\/wp\/seo\/how-to-block-referral-traffic-in-google-analytics\/#primaryimage"},"thumbnailUrl":"https:\/\/www.coding-dude.com\/wp\/wp-content\/uploads\/2016\/11\/google-analytics-spam.png","datePublished":"2016-12-01T07:49:10+00:00","dateModified":"2018-07-06T15:09:50+00:00","description":"So how do we block referral traffic in Google Analytics to avoid inclusion of spam referral? Dubious referral websites like abc.xyz and lifehac\u0138er.com","breadcrumb":{"@id":"https:\/\/www.coding-dude.com\/wp\/seo\/how-to-block-referral-traffic-in-google-analytics\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.coding-dude.com\/wp\/seo\/how-to-block-referral-traffic-in-google-analytics\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.coding-dude.com\/wp\/seo\/how-to-block-referral-traffic-in-google-analytics\/#primaryimage","url":"https:\/\/www.coding-dude.com\/wp\/wp-content\/uploads\/2016\/11\/google-analytics-spam.png","contentUrl":"https:\/\/www.coding-dude.com\/wp\/wp-content\/uploads\/2016\/11\/google-analytics-spam.png","width":1119,"height":502,"caption":"google analytics spammers"},{"@type":"BreadcrumbList","@id":"https:\/\/www.coding-dude.com\/wp\/seo\/how-to-block-referral-traffic-in-google-analytics\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.coding-dude.com\/wp\/"},{"@type":"ListItem","position":2,"name":"How to Block Referral Traffic in Google Analytics"}]},{"@type":"WebSite","@id":"https:\/\/www.coding-dude.com\/wp\/#website","url":"https:\/\/www.coding-dude.com\/wp\/","name":"Coding Dude","description":"Coding tutorials, tips and tricks","publisher":{"@id":"https:\/\/www.coding-dude.com\/wp\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.coding-dude.com\/wp\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.coding-dude.com\/wp\/#organization","name":"Coding Dude","url":"https:\/\/www.coding-dude.com\/wp\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.coding-dude.com\/wp\/#\/schema\/logo\/image\/","url":"https:\/\/www.coding-dude.com\/wp\/wp-content\/uploads\/2018\/05\/codingdude-logo-wide.jpg","contentUrl":"https:\/\/www.coding-dude.com\/wp\/wp-content\/uploads\/2018\/05\/codingdude-logo-wide.jpg","width":226,"height":60,"caption":"Coding Dude"},"image":{"@id":"https:\/\/www.coding-dude.com\/wp\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/x.com\/codingdudecom"]},{"@type":"Person","@id":"https:\/\/www.coding-dude.com\/wp\/#\/schema\/person\/29b7100b9ec7bb332359bd9fcba98370","name":"John Negoita","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/d51d5d54d4c51f0a7bfe39333bd98cfc5245ab49433be692fce26b741c08181e?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/d51d5d54d4c51f0a7bfe39333bd98cfc5245ab49433be692fce26b741c08181e?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/d51d5d54d4c51f0a7bfe39333bd98cfc5245ab49433be692fce26b741c08181e?s=96&d=mm&r=g","caption":"John Negoita"},"description":"I'm a Java programmer, been into programming since 1999 and having tons of fun with it.","sameAs":["http:\/\/www.coding-dude.com","https:\/\/x.com\/codingdudecom"]}]}},"jetpack_featured_media_url":"https:\/\/www.coding-dude.com\/wp\/wp-content\/uploads\/2016\/11\/google-analytics-spam.png","amp_enabled":true,"_links":{"self":[{"href":"https:\/\/www.coding-dude.com\/wp\/wp-json\/wp\/v2\/posts\/2164","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.coding-dude.com\/wp\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.coding-dude.com\/wp\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.coding-dude.com\/wp\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.coding-dude.com\/wp\/wp-json\/wp\/v2\/comments?post=2164"}],"version-history":[{"count":9,"href":"https:\/\/www.coding-dude.com\/wp\/wp-json\/wp\/v2\/posts\/2164\/revisions"}],"predecessor-version":[{"id":2178,"href":"https:\/\/www.coding-dude.com\/wp\/wp-json\/wp\/v2\/posts\/2164\/revisions\/2178"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.coding-dude.com\/wp\/wp-json\/wp\/v2\/media\/2167"}],"wp:attachment":[{"href":"https:\/\/www.coding-dude.com\/wp\/wp-json\/wp\/v2\/media?parent=2164"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.coding-dude.com\/wp\/wp-json\/wp\/v2\/categories?post=2164"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.coding-dude.com\/wp\/wp-json\/wp\/v2\/tags?post=2164"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}