Link to home
Create AccountLog in
Avatar of Mike Waller
Mike WallerFlag for United States of America

asked on

removing old Google Analytics from site

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:  http://blindsanddesignforless.com

The version Joomla is running is 1.5.26

Thanks for your help!
Avatar of Scott Fell
Scott Fell
Flag of United States of America image

It's at the bottom. You now have two

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


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

Open in new window

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.
Avatar of Mike Waller

ASKER

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?
ASKER CERTIFIED SOLUTION
Avatar of Scott Fell
Scott Fell
Flag of United States of America image

Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
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?
Avatar of webtechgal
webtechgal

What editor are you using?
I see TinyMCE and JCE 1.5.5 in the dashboard.  how can i tell which one is being used?
Thanks!