搜索 | 用户支持

防范以用户支持为名的诈骗。我们绝对不会要求您拨打电话或发送短信,及提供任何个人信息。请使用“举报滥用”选项报告涉及违规的行为。

详细了解

can I prevent google analytics from placing its script on pages I open?

  • 3 个回答
  • 16 人有此问题
  • 2 次查看
  • 最后回复者为 mykstor

more options

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!

<p style="color:red;">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:<br><br> <code> <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> </code> <br><br> 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?<br><br> 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.<br><br>Even this FireFof Help Page puts a similar script on this page:<br><br><code> <script src="/media/js/webtrends.[my spoiler]js" defer=""></code><br><br> Is anyone else ticked off by this? If so, can you offer help?<br><br> 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)

more options

选择的解决方案

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于修改

more options

Try the NoScript extension, works for issues just like the one you posted.

https://addons.mozilla.org/en-US/firefox/addon/noscript/

more options

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.