Saturday, January 5, 2019

(All Devices) How to Fix Don't Track My Views on Blogger

Make a button on your blog. Push it on the device you use! 


Works on all devices including Android, iPhone, iPad, tablet, and phones. No developer console required. No bookmarklets required. No Javascript in address bar required.


1. Create a post on your blog.
2. Switch to HTML mode in the editor.
3. Paste this code:
<div align="center">
<button onclick="mybutton()">Don't track my views on this blog</button>
<script type="text/javascript">
//<![CDATA[
function mybutton() {
var btn = document.createElement("BUTTON");
var date = new Date();
date.setTime(date.getTime()+(999*24*60*60*1000));
var expires = "; expires="+date.toGMTString();
document.cookie = "_ns"+"="+2+expires+"; path=/";
}//]]></script></div>

4. Publish the post.
5. View the post on each device you use and click the button. Done!



Note:
  • You have to put the button on YOUR blog. Clicking my button just sets the cookie for MY blog. Sites only have permission to set cookies on their own pages!
  • Deleting cookies from your browser history will undo the work!

Reference:


Run JavaScript  on a Blogger post with a push of a button
JavaScript code to write Blogger cookie

No comments:

Post a Comment

You can add Images, Colored Text and more to your comment.
See instructions at http://macrolayer.blogspot.com..