Stop Tracking your own page view in Blog

Stop Tracking your own page view in Blog



Using below piece code we can stop own page views in blog


1. Login to Blog as admin





In above page, Click on "Don't track my views for this blog."  In the same page right click and select on INSPECT

Go to Console tab and paste below code and click on enter

function createCookie(name,value,days) {

    if (days) {

        var date = new 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);


Note: In above code 999 is the number of days this code will work.

Post a Comment

0 Comments