0

For some unknown reason Joomla loads ga.js from google servers by default. The call is located in the file libraries/joomla/google/embed/analytics.php

How can I prevent loading of the script without modifying the core files?

8
  • Firstly check template which you are using are not enabling the google analytics, If your template does not have any setting then check any plugin which doing same thing. Commented May 7, 2018 at 4:32
  • @raVan96 It is beeing loaded on a fresh joomla 3.8.7 installation with both the beez and protostar templates with no 3rd party addons Commented May 7, 2018 at 11:27
  • There will be something that is Loading or enabling the code of google analytics. Joomla default doesn't add any analytics code. Did you face this issue on production environment or local environment ? Commented May 7, 2018 at 12:07
  • Can you check the index.php file of both template ? Might be the head tag have <script> tag which is loading this ga.js file Commented May 7, 2018 at 12:57
  • Definitely not coming from the template. It's being loaded with the <jdoc:include type ="head" />. It is added through the library mentioned above in my original post even on a clean installation. The result is a script tag with the src ssl.google-analytics.com/ga.js see Screenshot: imagebucket.net/rrdt443uosun/joomla_ga.PNG Commented May 7, 2018 at 15:52

2 Answers 2

3

Joomla does not add google analytics code at all on fresh installation.

So You need to check below stuff and make sure it is not a browser extension :)

  1. Firstly check template which you are using are not enabling the google analytics. Most of Joomla template does have google analytics option.

  2. If above case is not true then , You need to check the index.php file of template ? Might be someone have added script tag there it self in head section.

  3. If above both two case are failed then it might have chance of any system plugin triggering off which loads that google analytics code. So you need to disable that plguin by going to Administrator->Extensions->Plugins. Add filter of system plugin and disabled it.

Sign up to request clarification or add additional context in comments.

Comments

1

Sorry for the confusion: it turns out, it wasn't Joomla after all, but a Browser extension that loaded the script.

In my case it was Contrast Ratio Checker for Chrome.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.