Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / Q about statcounter.com and zen cart CSS

Q about statcounter.com and zen cart CSS

Locked

Views: 3,062

Results 1 to 6 of 6
This thread is locked. New replies are disabled.
19 May 2007, 4:31 AM
#1
queenkat avatar

queenkat

Zen Follower

Join Date:
Dec 2006
Posts:
121
Plugin Contributions:
0

Q about statcounter.com and zen cart CSS

hello all. this maybe in the wrong place, but I think it most fits here..

I use www.statcounter.com to track my stats. They give me a code to add to my site that stays in the background and counts while people surf...

well, I wanted it in my footer, but when I put it there, it breaks all my code and I get a page can not be displayed error.

Here's the code that they give me:

<!-- Start of StatCounter Code -->
<script type="text/javascript" language="javascript">
var sc_project=1126501; 
var sc_invisible=0; 
var sc_partition=10; 
var sc_security="1a349e49"; 
</script>
<script type="text/javascript" language="javascript" src="<A href="http://www.statcounter.com/counter/frames.js"></script><noscript><a">http://www.statcounter.com/counter/frames.js"></script><noscript><a href="[URL]http://www.statcounter.com/[/URL]" target="_blank"><img  src="[URL]http://c11.statcounter.com/counter.php?sc_project=1126501&java=0&security=1a349e49&invisible=0[/URL]" alt="website metrics" border="0"></a> </noscript>
<!-- End of StatCounter Code -->

(sorry I don't know how to insert fancy code in this bb)

Can someone tell me what can possibly be causing the problem? and is this possilbe to fix?

Thanks!

-Vikki

19 May 2007, 6:22 PM
#2
cupcake avatar

cupcake

New Zenner

Join Date:
May 2006
Location:
Pacific Northwest (Canada Jr.)
Posts:
25
Plugin Contributions:
0

Re: Q about statcounter.com and zen cart CSS

i use a statcounter as well, and i think that their instructions require that the code be inside of < body > tags. since the < body > tags are in the includes/templates/yourtemplate/common/tpl_main_page.php, you have to add it there.

i put my code in after this, since it's the last thing:

<!--eof- banner #6 display -->

but before the < / body > tag! should work like a charm! i have mine "hidden" though - so there's no little statcounter icon displayed.

21 May 2007, 4:06 AM
#3
queenkat avatar

queenkat

Zen Follower

Join Date:
Dec 2006
Posts:
121
Plugin Contributions:
0

Re: Q about statcounter.com and zen cart CSS

is there another place for this file to be? it is not in any of my template folders. thanks.

-Vikki

21 May 2007, 5:38 AM
#4
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: Q about statcounter.com and zen cart CSS

If you don't already have it in your template folder, find it in includes/templates/template_default/common/tpl_main_page.php and copy it to includes/templates/yourtemplate/common/tpl_main_page.php for editing.

21 May 2007, 10:13 AM
#5
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Location:
Tampa Bay, Florida
Posts:
10,717
Plugin Contributions:
56

Re: Q about statcounter.com and zen cart CSS

FWIW, I put the noscript code in includes/templates/custom/common/tpl_header.php and the script code in (new file) includes/templates/custom/jscript/jscript_custom_counter.php - worked like a charm.

Scott

That Software Guy. My Store: Zen Cart Support
Available for hire - See my ad in Services
Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
Do you benefit from Zen Cart? Then please support the project.

30 Jun 2008, 4:56 PM
#6
matbourne avatar

matbourne

New Zenner

Join Date:
Jun 2008
Posts:
25
Plugin Contributions:
0

Re: Q about statcounter.com and zen cart CSS

swguy:

FWIW, I put the noscript code in includes/templates/custom/common/tpl_header.php and the script code in (new file) includes/templates/custom/jscript/jscript_custom_counter.php - worked like a charm.

Scott

Hope you realise that if the Statcounter website goes down then the rest of your page will not load. This is why Statcounter suggests putting it at the end of all of your code but before the </body> tag.

Mat