Zen Cart Logo
Forums / General Questions / Help figure out which file creates this text

Help figure out which file creates this text

Locked

Views: 684

Results 1 to 4 of 4
This thread is locked. New replies are disabled.
31 May 2010, 10:37 PM
#1
mribble avatar

mribble

New Zenner

Join Date:
May 2010
Posts:
5
Plugin Contributions:
0

Help figure out which file creates this text

I have a store setup here: http://www.dreamingrobots.com/store/

Every page displays this text: /** * Added Google Analytics */

I can't figure out what in zencart is generating this text. Could people give me some ideas on where to look?

It is getting generated very early. When I look at the source for the page it looks like this:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="en">

/**

  • Added Google Analytics
    */
<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-76839-2"); pageTracker._trackPageview(); } catch(err) {}</script> <head> <title>DreamingRobots, The Store</title> ...
31 May 2010, 10:55 PM
#2
clydejones avatar

clydejones

Deceased

Join Date:
Nov 2005
Location:
Colorado Springs, CO USA
Posts:
7,017
Plugin Contributions:
12

Re: Help figure out which file creates this text

mribble:

I have a store setup here: http://www.dreamingrobots.com/store/

Every page displays this text: /** * Added Google Analytics */

I can't figure out what in zencart is generating this text. Could people give me some ideas on where to look?

It is getting generated very early. When I look at the source for the page it looks like this:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="en">

/**

  • Added Google Analytics
    */
<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-76839-2"); pageTracker._trackPageview(); } catch(err) {}</script> <head> <title>DreamingRobots, The Store</title> ...

check includes/templates/YOUR_TEMPLATE/common/html_header.php

Also make sure you've installed the google analytics mod correctly.

31 May 2010, 11:02 PM
#3
mribble avatar

mribble

New Zenner

Join Date:
May 2010
Posts:
5
Plugin Contributions:
0

Re: Help figure out which file creates this text

Thanks so much! It was in the file you suggested. Google analytics is working with my store so I think it's installed correctly.

31 May 2010, 11:34 PM
#4
g1smd avatar

g1smd

Zen Follower

Join Date:
Mar 2010
Location:
UK
Posts:
449
Plugin Contributions:
0

Re: Help figure out which file creates this text

mribble:

Thanks so much! It was in the file you suggested. Google analytics is working with my store so I think it's installed correctly.

The text should not show like that.

You might want to change the /** Added Google Analytics / comment notation to instead be <!-- Added Google Analytics --> there.