{"id":1946,"date":"2011-05-25T17:10:26","date_gmt":"2011-05-25T17:10:26","guid":{"rendered":"http:\/\/www.gosquared.com\/liquidicity\/?p=1946"},"modified":"2019-11-28T12:51:06","modified_gmt":"2019-11-28T12:51:06","slug":"facebook-like-button-ignoring-duplicate-traffic","status":"publish","type":"post","link":"https:\/\/www.gosquared.com\/blog\/facebook-like-button-ignoring-duplicate-traffic","title":{"rendered":"Facebook Like Button &#8211; Ignoring Duplicate Traffic"},"content":{"rendered":"<p><img decoding=\"async\" src=\"https:\/\/static.gosquared.com\/images\/liquidicity\/11_05_25_facebooklike_790x200.jpg\" width=\"790\" alt=\"Facebook Like Button - How to avoid duplicating your stats\"\/><\/p>\n<div id=\"fb-root\"><\/div>\n<p><script src=\"https:\/\/connect.facebook.net\/en_US\/all.js#appId=227598200583807&amp;xfbml=1\"><\/script><fb:like href=\"\" send=\"false\" width=\"450\" show_faces=\"true\" font=\"arial\"><\/fb:like><\/p>\n<p>We&#8217;ve noticed some odd things happening to some of our stats, and it&#8217;s been brought to our attention that some of you, our customers, are experiencing similar issues. The problem pertains to pages with Facebook&#8217;s &#8220;Like&#8221; button or any of their other <a href=\"http:\/\/developers.facebook.com\/docs\/plugins\/\">social plugins<\/a>.<\/p>\n<h3>Quietly duplicating requests.<\/h3>\n<p>Under certain circumstances, a page with a Like button can register one extra pageview for every button you have on the page. This is undesirable, because if you run a site with, say, ten like buttons on the homepage, you&#8217;ll see eleven pageviews for each and every time someone actually views the page, not one. Obviously this is going to completely throw off all your tracked stats and analytics. Not good.<\/p>\n<p><!--more--><\/p>\n<h3>Blame IE.<\/h3>\n<p>It turns out this is a quirk of Facebook&#8217;s methods. For security reasons, AJAX requests typically aren&#8217;t allowed to be sent across domains (so, for example, a facebook plugin running on yourdomain.com wouldn&#8217;t be able to send an AJAX request to facebook.com). Most sensible browsers now implement a feature where a specific header (Access-Control-Allow-Origin) can be set to allow this behaviour. With one exception. Internet Explorer, being Internet Explorer, shuns all compatible web standards, so facebook have had to make a workaround. And for reasons we can&#8217;t quite fathom, they&#8217;ve decided to do that by loading your whole page again in an invisible iframe.<\/p>\n<h3>How this may have been affecting you.<\/h3>\n<p>This has a negative impact both server- and client-side. Not all sites have the tens of thousands of servers facebook has, and this method will multiply load levels by however many Like buttons you have on the page. And because of the way it&#8217;s implemented, it can slow the client-side browser down by a massive amount too. And for those of you who have auto-playing audio or video on your pages, you may have noticed you can&#8217;t put a like button on the page, because you sometimes end up heading a second audio stream coming apparently from nowhere. That&#8217;s all caused by this Facebook&#8217;s issue.<\/p>\n<h3>What can you do about this?<\/h3>\n<p>Firstly, we&#8217;ll be rolling out a new version of our tracker this week which won&#8217;t track these fake hits from Facebook. So you won&#8217;t get crazily distorted stats. But there are a couple of other things you can do to improve the situation further. Firstly, if you are using any other analytics services that allow you to filter out certain URLs, tell them to ignore any hits with the parameters &#8220;fb_xd_bust&#8221; or &#8220;fb_xd_fragment&#8221; in the URL. For example in Google Analytics you can <a href=\"http:\/\/www.google.com\/support\/analytics\/bin\/answer.py?answer=55492\" target=\"_blank\" rel=\"noopener noreferrer\">set a custom filter<\/a> to exclude request URIs matching the pattern &#8220;fb_xd_bust|fb_xd_fragment&#8221;.<\/p>\n<p>We&#8217;d also recommend you take a look at <a href=\"https: \/\/developers.facebook.com\/docs\/reference\/javascript\/FB.init\/\" target=\"_blank\" rel=\"noopener noreferrer\"> this page on Facebook&#8217;s developer site<\/a>. They don&#8217;t draw much attention to it, but the &#8220;Custom Channel URL&#8221; section is extremely important to anyone who doesn&#8217;t want their stats to be completely thrown off by Facebook&#8217;s somewhat strange methods.<\/p>\n<h3>To sum up.<\/h3>\n<ul>\n<li>Facebook use some strange method for their cross-domain ajax, which distorts all your stats and puts extra load on your servers, and they could do with drawing more attention to it.<\/li>\n<li>We&#8217;re rolling out a new tracker that takes care of the fake hits on our end so your stats don&#8217;t get broken.<\/li>\n<li>Check out ways to work around this so you don&#8217;t end up putting extra strain on your server, and ways to stop these fake hits showing up in your other analytics services.<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>We&#8217;ve noticed some odd things happening to some of our stats, and it&#8217;s been brought to our attention that some&#8230;<\/p>\n","protected":false},"author":5,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1208],"tags":[96,341,608,750,844,902],"class_list":["post-1946","post","type-post","status-publish","format-standard","hentry","category-marketing","tag-analytics","tag-facebook","tag-metrics","tag-real-time","tag-stats","tag-tracking"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v18.6 (Yoast SEO v19.0) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Facebook Like Button - Ignoring Duplicate Traffic - GoSquared Blog<\/title>\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.gosquared.com\/blog\/facebook-like-button-ignoring-duplicate-traffic\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Facebook Like Button - Ignoring Duplicate Traffic\" \/>\n<meta property=\"og:description\" content=\"We&#8217;ve noticed some odd things happening to some of our stats, and it&#8217;s been brought to our attention that some...\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.gosquared.com\/blog\/facebook-like-button-ignoring-duplicate-traffic\" \/>\n<meta property=\"og:site_name\" content=\"GoSquared Blog\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/GoSquared\" \/>\n<meta property=\"article:published_time\" content=\"2011-05-25T17:10:26+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2019-11-28T12:51:06+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/static.gosquared.com\/images\/liquidicity\/11_05_25_facebooklike_790x200.jpg\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@floopily\" \/>\n<meta name=\"twitter:site\" content=\"@GoSquared\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"JT\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.gosquared.com\/blog\/#organization\",\"name\":\"GoSquared\",\"url\":\"https:\/\/www.gosquared.com\/blog\/\",\"sameAs\":[\"https:\/\/instagram.com\/gosquaredteam\",\"https:\/\/www.linkedin.com\/company\/go-squared-ltd.\",\"https:\/\/www.facebook.com\/GoSquared\",\"https:\/\/twitter.com\/GoSquared\"],\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.gosquared.com\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.gosquared.com\/blog\/wp-content\/uploads\/2015\/07\/gosquared.png\",\"contentUrl\":\"https:\/\/www.gosquared.com\/blog\/wp-content\/uploads\/2015\/07\/gosquared.png\",\"width\":1270,\"height\":250,\"caption\":\"GoSquared\"},\"image\":{\"@id\":\"https:\/\/www.gosquared.com\/blog\/#\/schema\/logo\/image\/\"}},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.gosquared.com\/blog\/#website\",\"url\":\"https:\/\/www.gosquared.com\/blog\/\",\"name\":\"GoSquared Blog\",\"description\":\"Turn visitors into customers.\",\"publisher\":{\"@id\":\"https:\/\/www.gosquared.com\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.gosquared.com\/blog\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.gosquared.com\/blog\/facebook-like-button-ignoring-duplicate-traffic#primaryimage\",\"url\":\"https:\/\/static.gosquared.com\/images\/liquidicity\/11_05_25_facebooklike_790x200.jpg\",\"contentUrl\":\"https:\/\/static.gosquared.com\/images\/liquidicity\/11_05_25_facebooklike_790x200.jpg\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.gosquared.com\/blog\/facebook-like-button-ignoring-duplicate-traffic#webpage\",\"url\":\"https:\/\/www.gosquared.com\/blog\/facebook-like-button-ignoring-duplicate-traffic\",\"name\":\"Facebook Like Button - Ignoring Duplicate Traffic - GoSquared Blog\",\"isPartOf\":{\"@id\":\"https:\/\/www.gosquared.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.gosquared.com\/blog\/facebook-like-button-ignoring-duplicate-traffic#primaryimage\"},\"datePublished\":\"2011-05-25T17:10:26+00:00\",\"dateModified\":\"2019-11-28T12:51:06+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/www.gosquared.com\/blog\/facebook-like-button-ignoring-duplicate-traffic#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.gosquared.com\/blog\/facebook-like-button-ignoring-duplicate-traffic\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.gosquared.com\/blog\/facebook-like-button-ignoring-duplicate-traffic#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.gosquared.com\/blog\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Facebook Like Button &#8211; Ignoring Duplicate Traffic\"}]},{\"@type\":\"Article\",\"@id\":\"https:\/\/www.gosquared.com\/blog\/facebook-like-button-ignoring-duplicate-traffic#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.gosquared.com\/blog\/facebook-like-button-ignoring-duplicate-traffic#webpage\"},\"author\":{\"@id\":\"https:\/\/www.gosquared.com\/blog\/#\/schema\/person\/bfcd35bf2eba92ecbeea67937cd23eef\"},\"headline\":\"Facebook Like Button &#8211; Ignoring Duplicate Traffic\",\"datePublished\":\"2011-05-25T17:10:26+00:00\",\"dateModified\":\"2019-11-28T12:51:06+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.gosquared.com\/blog\/facebook-like-button-ignoring-duplicate-traffic#webpage\"},\"wordCount\":590,\"commentCount\":1,\"publisher\":{\"@id\":\"https:\/\/www.gosquared.com\/blog\/#organization\"},\"image\":{\"@id\":\"https:\/\/www.gosquared.com\/blog\/facebook-like-button-ignoring-duplicate-traffic#primaryimage\"},\"thumbnailUrl\":\"https:\/\/static.gosquared.com\/images\/liquidicity\/11_05_25_facebooklike_790x200.jpg\",\"keywords\":[\"Analytics\",\"Facebook\",\"Metrics\",\"Real-Time\",\"Stats\",\"Tracking\"],\"articleSection\":[\"Master Marketing\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.gosquared.com\/blog\/facebook-like-button-ignoring-duplicate-traffic#respond\"]}]},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.gosquared.com\/blog\/#\/schema\/person\/bfcd35bf2eba92ecbeea67937cd23eef\",\"name\":\"JT\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.gosquared.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/772e026206b900a5ba17ebbe63e34a4c8a9103524cf0ba3accfa38b14d7d03ba?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/772e026206b900a5ba17ebbe63e34a4c8a9103524cf0ba3accfa38b14d7d03ba?s=96&d=mm&r=g\",\"caption\":\"JT\"},\"description\":\"JT is a co-founder and the lead front-end engineer at GoSquared. He's responsible for the shiniest of the shiny projects we work on.\",\"sameAs\":[\"https:\/\/twitter.com\/floopily\"],\"url\":\"https:\/\/www.gosquared.com\/blog\/author\/jt\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Facebook Like Button - Ignoring Duplicate Traffic - GoSquared Blog","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.gosquared.com\/blog\/facebook-like-button-ignoring-duplicate-traffic","og_locale":"en_US","og_type":"article","og_title":"Facebook Like Button - Ignoring Duplicate Traffic","og_description":"We&#8217;ve noticed some odd things happening to some of our stats, and it&#8217;s been brought to our attention that some...","og_url":"https:\/\/www.gosquared.com\/blog\/facebook-like-button-ignoring-duplicate-traffic","og_site_name":"GoSquared Blog","article_publisher":"https:\/\/www.facebook.com\/GoSquared","article_published_time":"2011-05-25T17:10:26+00:00","article_modified_time":"2019-11-28T12:51:06+00:00","og_image":[{"url":"https:\/\/static.gosquared.com\/images\/liquidicity\/11_05_25_facebooklike_790x200.jpg"}],"twitter_card":"summary_large_image","twitter_creator":"@floopily","twitter_site":"@GoSquared","twitter_misc":{"Written by":"JT","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Organization","@id":"https:\/\/www.gosquared.com\/blog\/#organization","name":"GoSquared","url":"https:\/\/www.gosquared.com\/blog\/","sameAs":["https:\/\/instagram.com\/gosquaredteam","https:\/\/www.linkedin.com\/company\/go-squared-ltd.","https:\/\/www.facebook.com\/GoSquared","https:\/\/twitter.com\/GoSquared"],"logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.gosquared.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.gosquared.com\/blog\/wp-content\/uploads\/2015\/07\/gosquared.png","contentUrl":"https:\/\/www.gosquared.com\/blog\/wp-content\/uploads\/2015\/07\/gosquared.png","width":1270,"height":250,"caption":"GoSquared"},"image":{"@id":"https:\/\/www.gosquared.com\/blog\/#\/schema\/logo\/image\/"}},{"@type":"WebSite","@id":"https:\/\/www.gosquared.com\/blog\/#website","url":"https:\/\/www.gosquared.com\/blog\/","name":"GoSquared Blog","description":"Turn visitors into customers.","publisher":{"@id":"https:\/\/www.gosquared.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.gosquared.com\/blog\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.gosquared.com\/blog\/facebook-like-button-ignoring-duplicate-traffic#primaryimage","url":"https:\/\/static.gosquared.com\/images\/liquidicity\/11_05_25_facebooklike_790x200.jpg","contentUrl":"https:\/\/static.gosquared.com\/images\/liquidicity\/11_05_25_facebooklike_790x200.jpg"},{"@type":"WebPage","@id":"https:\/\/www.gosquared.com\/blog\/facebook-like-button-ignoring-duplicate-traffic#webpage","url":"https:\/\/www.gosquared.com\/blog\/facebook-like-button-ignoring-duplicate-traffic","name":"Facebook Like Button - Ignoring Duplicate Traffic - GoSquared Blog","isPartOf":{"@id":"https:\/\/www.gosquared.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.gosquared.com\/blog\/facebook-like-button-ignoring-duplicate-traffic#primaryimage"},"datePublished":"2011-05-25T17:10:26+00:00","dateModified":"2019-11-28T12:51:06+00:00","breadcrumb":{"@id":"https:\/\/www.gosquared.com\/blog\/facebook-like-button-ignoring-duplicate-traffic#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.gosquared.com\/blog\/facebook-like-button-ignoring-duplicate-traffic"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.gosquared.com\/blog\/facebook-like-button-ignoring-duplicate-traffic#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.gosquared.com\/blog"},{"@type":"ListItem","position":2,"name":"Facebook Like Button &#8211; Ignoring Duplicate Traffic"}]},{"@type":"Article","@id":"https:\/\/www.gosquared.com\/blog\/facebook-like-button-ignoring-duplicate-traffic#article","isPartOf":{"@id":"https:\/\/www.gosquared.com\/blog\/facebook-like-button-ignoring-duplicate-traffic#webpage"},"author":{"@id":"https:\/\/www.gosquared.com\/blog\/#\/schema\/person\/bfcd35bf2eba92ecbeea67937cd23eef"},"headline":"Facebook Like Button &#8211; Ignoring Duplicate Traffic","datePublished":"2011-05-25T17:10:26+00:00","dateModified":"2019-11-28T12:51:06+00:00","mainEntityOfPage":{"@id":"https:\/\/www.gosquared.com\/blog\/facebook-like-button-ignoring-duplicate-traffic#webpage"},"wordCount":590,"commentCount":1,"publisher":{"@id":"https:\/\/www.gosquared.com\/blog\/#organization"},"image":{"@id":"https:\/\/www.gosquared.com\/blog\/facebook-like-button-ignoring-duplicate-traffic#primaryimage"},"thumbnailUrl":"https:\/\/static.gosquared.com\/images\/liquidicity\/11_05_25_facebooklike_790x200.jpg","keywords":["Analytics","Facebook","Metrics","Real-Time","Stats","Tracking"],"articleSection":["Master Marketing"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.gosquared.com\/blog\/facebook-like-button-ignoring-duplicate-traffic#respond"]}]},{"@type":"Person","@id":"https:\/\/www.gosquared.com\/blog\/#\/schema\/person\/bfcd35bf2eba92ecbeea67937cd23eef","name":"JT","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.gosquared.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/772e026206b900a5ba17ebbe63e34a4c8a9103524cf0ba3accfa38b14d7d03ba?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/772e026206b900a5ba17ebbe63e34a4c8a9103524cf0ba3accfa38b14d7d03ba?s=96&d=mm&r=g","caption":"JT"},"description":"JT is a co-founder and the lead front-end engineer at GoSquared. He's responsible for the shiniest of the shiny projects we work on.","sameAs":["https:\/\/twitter.com\/floopily"],"url":"https:\/\/www.gosquared.com\/blog\/author\/jt"}]}},"wps_subtitle":"Subtitle","_links":{"self":[{"href":"https:\/\/www.gosquared.com\/blog\/wp-json\/wp\/v2\/posts\/1946","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.gosquared.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.gosquared.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.gosquared.com\/blog\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/www.gosquared.com\/blog\/wp-json\/wp\/v2\/comments?post=1946"}],"version-history":[{"count":0,"href":"https:\/\/www.gosquared.com\/blog\/wp-json\/wp\/v2\/posts\/1946\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.gosquared.com\/blog\/wp-json\/wp\/v2\/media?parent=1946"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.gosquared.com\/blog\/wp-json\/wp\/v2\/categories?post=1946"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.gosquared.com\/blog\/wp-json\/wp\/v2\/tags?post=1946"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}