can I prevent google analytics from placing its script on pages I open?
I resent google analytics for placing its script on every page that website builders ask it to.
Users place a script like this on their page, which then google does when this request script is present. It always looks similar to this:
<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.[my spoiler]com/' ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
When you open any page containing this script, it will write google's analytic script at the top of that page, this in turn, collects data about you and your browsing. At the bottom of the page is the second half of this b.s. script.
How can I program Firefox to recognize this particular string at onload and jimmy this script so it can't write the script it's meant to?
Microsoft and others also have such gimmicks I'd like to jam. MS puts a 1x1 pixel "img" tag, which isn't meant to be noticed, but Firefox automatically performs a 'get' for it. This phony image is really a reference number that ends up cached.
Even this FireFof Help Page puts a similar script on this page: <script src="/media/js/webtrends.[my spoiler]js" defer="">
Is anyone else ticked off by this? If so, can you offer help?
Many thanks in advance!
由mykstor于
被采纳的解决方案
Can I prevent Google Analytics from placing its script on pages I open? :
Both a hosts file and the Adblock Plus extension will remove, you may have to add your own more aggressive filters based on your own usage and what you find. Some sites may not work if they find content is blocked that's what makes filters more personal (see link below for more information)
I have three subscription filters in "Adblock Plus" and my own as well
- EasyList US is the main comprehensive filter used by Adblock Plus users
- Fanboy's List many additional filters not included above
- Peter Lowe's List -- seems oriented to blocking trackers
Also see How do I block advertising for more information
定位到答案原位置 👍 2所有回复 (3)
选择的解决方案
Can I prevent Google Analytics from placing its script on pages I open? :
Both a hosts file and the Adblock Plus extension will remove, you may have to add your own more aggressive filters based on your own usage and what you find. Some sites may not work if they find content is blocked that's what makes filters more personal (see link below for more information)
I have three subscription filters in "Adblock Plus" and my own as well
- EasyList US is the main comprehensive filter used by Adblock Plus users
- Fanboy's List many additional filters not included above
- Peter Lowe's List -- seems oriented to blocking trackers
Also see How do I block advertising for more information
由David McRitchie于
Try the NoScript extension, works for issues just like the one you posted.
Thanks to all of you. Hard to choose a 'best' answer. What's cool is that people care enough to take the time to help. I'll have to experiment with a bit and a bit of that, I guess. I wish I just knew how to pre-load a single script that would recognize the starting part of the string that comprises google analytics script that causes it to write another one, and a couple more, perhaps. The google script tells your browser to write a more specific one for you.