removing old Google Analytics from site

Posted on 2013-05-21
Last Modified: 2016-02-24
Hi there.  i just moved over a Joomla site to my server and need to remove the previous Google Analytics code that the previous developer had put in.  I logged into the Administrator -> Extensions -> Template Manager, then Edit HTML on the template and added in the new GA code but the old code was not in there.

I have no idea where he placed that code. I'm assuming he hard coded it into a file?

Here is the site:

The version Joomla is running is 1.5.26

Thanks for your help!
Question by:COwebmaster
  • 4
  • 3
LVL 52

Expert Comment

by:Scott Fell, EE MVE
ID: 39185395
It's at the bottom. You now have two

<script type="text/javascript">
  var _gaq = _gaq || [];
  _gaq.push(['_setAccount', 'UA-41002353-1']);
  (function() {
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);

			<script type="text/javascript">
			var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
			document.write(unescape("%3Cscript src='" + gaJsHost + "' type='text/javascript'%3E%3C/script%3E"));
			<script type="text/javascript">
			try {
			var pageTracker = _gat._getTracker("UA-20884212-1");
			} catch(err) {}</script>

Open in new window

LVL 52

Expert Comment

by:Scott Fell, EE MVE
ID: 39185403
I think you will loose your history, can't you get your old developer to make you an admin for that domain in GA, then just remove that person.   This way, you will keep your history.

Author Comment

ID: 39186086
I'm not concerned about the history just removing that old code.  Do you where and in which php file i would need to look in to remove that old code?  or in administrator area?
LVL 52

Accepted Solution

Scott Fell,  EE MVE earned 500 total points
ID: 39186100
Just edit your template and remove the google. code. It will be at the bottom.

Look to make sure you keep/remove the correct code.  

getTracker("UA-20884212-1") vs UA-41002353-1']);

You will want to remove everything from <script> to </script> for that account.
What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.


Author Comment

ID: 39186110
I logged into the Administrator -> Extensions -> Template Manager, then Edit HTML on the template and added in the new GA code but the old code was not in there.

Where else would it be?

Expert Comment

ID: 39194419
What editor are you using?

Author Comment

ID: 39195578
I see TinyMCE and JCE 1.5.5 in the dashboard.  how can i tell which one is being used?

Author Closing Comment

ID: 39245461

Featured Post

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

Suggested Solutions

Read about the 3 stages of the buyer's journey: awareness, consideration, and decision.
This article discusses four methods for overlaying images in a container on a web page
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

758 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now