Fix Blogger Tracking Your Pageviews

Your blog’s quick stats on the dashboard reflects the number of page views your weblog received inwards a given fourth dimension window, the stats tin travel inaccurate every bit it powerfulness likewise travel counting your ain pageviews.

Blogger does render an pick to halt tracking your pageview, though it doesn’t piece of work properly for many Blogger users.

Of course of report many weblog owners powerfulness non desire to rail their ain pageviews, peculiarly when fifty-fifty depression number of page views from their side may impact the overall stats, therefore it makes perfect feel that y’all may desire to tell Blogger to halt tracking inwards on your account.

We late started getting a lot of queries nigh “why blogger is notwithstanding tracking my pageviews” together with similar, on Twitter together with inwards the forums inwards large quantity. Here’s a tweet from a Blogger user amongst the hashtag #gHelp seeking for attention amongst the issue

The most straightforward pick is to laid the pick inwards your blog’s dashboard, that tin travel done past times next these steps (these are optional steps, y’all may cause got turned it on already):

  1. Go to your Blogger Dashboard
  2. Select the Stats -> Overview tab & together with then click on “Manage tracking your ain pageviews
  3. You shall travel straight off taken to a novel tab amongst the next URL format: https://[yourblog]
  4. Check the box that says “Don’t rail my views for this blog.”, together with that’s it.
This is supposed to halt tracking your pageviews on the blog, but if y’all exam it y’all volition notice that it doesn’t work. You tin cheque this if it industrial plant or non past times refreshing your weblog inwards the browser, together with afterwards that refresh the stats on your blogger dashboard – y’all volition come across that the views are notwithstanding existence counted rendering the pick to plough it off completely useless. 

A Valid Workaround

We know that it doesn’t work, together with Blogger engineers are notwithstanding on it to ready it, but meanwhile many weblog owners are affected together with this has to travel fixed somehow. 
To tell Blogger to non count your pageview is non a magic, the technique is to laid a cookie on your browser therefore that whenever y’all charge your weblog the server knows that y’all practice non desire your pageviews to travel counted, if the cookie, which is naught but a small-scale text file saved for websites that contains information used past times the browser together with server, is non available it counts your views.

What the occupation is

(You may desire to motion to the adjacent department if y’all desire to only know how to ready it)
The mistake is amongst where the cookie is laid when y’all instruct to the options page that let’s y’all select if y’all desire the weblog to halt tracking your pageviews. 
The URL is: https://[yourblog]

The cookie named “_ns” amongst the value of “2” is supposed to travel onslaught weblog address, but due to an mistake on the Blogger organization the cookie is entirely onslaught the /b whereas it is supposed to travel onslaught the “/” path which signifies that it must piece of work on every page of your blog, but due to the mistake it is not.
Here are roughly screenshots amongst the information of cookies that is laid spell nosotros toggle the option

Everything seems to piece of work okay. As y’all tin see, when the pick inwards the 2nd ikon inwards unchecked (highlighted inwards orange), the cookie named “_ns” disappears. That is how it is supposed to work, the occupation genuinely is its Path value laid to /b

And every bit the path is laid to /b the cookie appears no where on the weblog except for the page that starts on the path /b

The Workaround

To brand this piece of work i.e to cause got Blogger halt counting our ain pageviews nosotros only cause got to laid a cookie on the blog, but this fourth dimension manually every bit the options page that Blogger provides us doesn’t piece of work properly. 
That tin travel done amongst a elementary JavaScript snippet. All nosotros volition practice is laid a cookie amongst the scream “_ns” together with the value  “2” on the rootage path of your blog. 
Without whatever farther delay here’s the code nosotros need (copy it to your clipboard):

function createCookie(name,value,days) {     if (days) {         var appointment = novel Date();         date.setTime(date.getTime()+(days*24*60*60*1000));         var expires = "; expires="+date.toGMTString();     }     else var expires = "";     document.cookie = name+"="+value+expires+"; path=/";     }          createCookie("_ns", "2", 999); 

The snippet volition create a cookie amongst the passed values inwards createCookie("_ns", "2", 999);, y’all practice non need to empathize anything nigh this for it work, entirely affair y’all powerfulness travel interested is the number of days this cookie volition travel valid for, inwards the code nosotros cause got laid it to 999 days, afterwards that the cookie volition travel removed itself from the browser. You tin laid the value higher or lower if y’all like.

Using the code snippet

After y’all cause got copied the code opened upwards your blog’s homepage. To run this code y’all need to access the JavaScript console, at that topographic point are unlike ways to opened upwards the console inwards unlike browsers, I am mentioning how to practice it inwards Chrome together with Firefox

Google Chrome

You tin opened upwards the console using the keyboard shortcut CTRL+Shift+J / F12 on Windows or CMD+Option+J, or y’all could correct click on an empty expanse inwards the spider web page, together with then select Inspect together with switch to the Console tab.

Following screenshot shows the code entered inwards the JavaScript console on Chrome.

After pasting the code inwards place, striking travel inwards together with that’s it. The cookie is laid together with straight off until the cookie expires or is manually removed (by clearing cookies off your browser) Blogger would non count your page-views when y’all access your weblog from the browser.

Mozilla Firefox

To opened upwards the console inwards Firefox: CTRL+Shift+K on Windows or +Option+K on Mac. Or y’all could Right Click, together with then select Inspect Element together with and then instruct to the Console tab.

Enter the code inwards the console window together with striking enter. Here’s how it must await similar inwards Mozilla Firefox:

On Safari

On your Safari browser click on the Develop bill of fare together with select “Show JavaScript Console” to opened upwards the JavaScript console where y’all volition travel entering the script y’all copied above. 
If y’all don’t come across the Develop bill of fare inwards the bill of fare bar, select Safari > Preferences, click Advanced, together with then select “Show Develop bill of fare inwards bill of fare bar.”.
Important note: If y’all are on URL together with then cheque which version of your blogspot has loaded, Blogger mainly redirects URLs based on the visitors country, therefore if y’all are inwards the Great Britain it volition alter to Setting the cookie on or your province specific TLD won’t piece of work on other province specific TLDs. You tin laid the cookie on all of the variants if y’all like. 

The Cookie’s straight off set. That’s it.

Now that y’all cause got run the code the cookie that nosotros cause got been mentioning throughout the postal service volition travel onslaught inwards your browser. As long every bit the cookie stays inwards the browser whatever visits to your weblog from that browser would non travel counted towards the pageviews of your blog. 
If y’all utilisation unlike browsers, y’all may likewise utilisation this code inwards those to halt tracking the pageviews from those every bit well. 
Note that it is possible inwards browsers to laid an pick that deletes whatever cookies on a site i time it is closed, therefore I recommend y’all to await for the pick for cookies inwards your browser if this doesn’t seem to work, if occupation continues delight postal service a comment on this post.