firefox上的Google Experiment A / B黑客错误

I'm trying to implement an A/B test using Google experiments. The site uses a PHP CMS without individual page files, so in the master page (Where the <head> is) I put a simple if statement to detect the page.

So instead of <script> GOOGLE CODE </script>

I have

<script>if (document.URL=="http://www.mysite/"){ GOOGLE CODE }</script>

This executes fine, but when the script chooses the variant page Firefox shows an error message saying "There has been a hacking attempt, Firefox is preventing this page from executing scripts". This only happens some of the time, most notably when the page loads through Google.

Please help?

This actually turned out to be a server security setting. Apparently some servers poll triggering code for suspicious activity. If you're having a similar problem, try using a server-side language (PHP in my case) to do the same code rather than doing it with JS.