I just noticed there was this script in my source code:

<script src='/google_analytics_auto.js'></script>

I did not insert this script and I have no plugins, so I don't know why it's there? Does someone know how to remove that?

  • 5
    There is no such script in WordPress core. I don't think this can be answered in current form, you need to figure out where is it coming from in your site.
    – Rarst
    Jul 4 '13 at 17:28
  • 4
    It's probably part of your theme.
    – vancoder
    Jul 4 '13 at 17:44

The reason is you are using HostGator and enable the feature is Google Analytics Integration, by enable this one, HostGator will automatically add this snipped of code into your main website and all of it sub or add-on domain:

<script src='/google_analytics_auto.js'></script></head>

I my self also faced with this issue, my main website is http://nguyenhuutrong.com and I got the above line of code when viewing source, I tried to have one fresh Wordpress in my add-on domain, but it still be there. After I tried to install wordpress on my local (by using XAMPP) then I found out the root cause is Google Analytics Integration of HostGator.

You just going to cPanel, choose the Google Analytics Integration, at the configuration you just choose to uninstall the Google Analytics (UA) for your domain and it will work.


Check header.php and footer.php; sounds like that link is part of your theme and is pulling that script, possibly from a plugin that is supposed to be included with the theme or in the "must use" plugin folder, which is called mu-plugins in wp-content.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy