Print Page | Close Window

Adding Statcounter Code

Printed From: Web Wiz Forums
Category: Web Wiz Web App Support Forums
Forum Name: Web Wiz Forums
Forum Description: Support forum for Web Wiz Forums application.
URL: https://forums.webwiz.net/forum_posts.asp?TID=16553
Printed Date: 17 April 2026 at 11:30am
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: Adding Statcounter Code
Posted By: mike henson
Subject: Adding Statcounter Code
Date Posted: 14 September 2005 at 4:39pm
I would like to add Statcounter Javascript Code to (presumably) default.asp so I can track visitors.
 
The code needs to go between the <Body></Body> tags.
 
I can't find the <Body> tag on default.asp and although I can see, and place the code before the </Body> tag on includes/footer.asp the code appears in-vision when I upload the new file.
 
Can you tell me where the correct location is for the code please?
 
Thank you
 
Mike
 



Replies:
Posted By: dj air
Date Posted: 14 September 2005 at 4:45pm
the first body tag is within the header.asp i believe

im not 100% what your trying to do, you want ot count how long a user is on that age.. how are you going to collect it, i mean yourself


Posted By: mike henson
Date Posted: 15 September 2005 at 3:21pm
Thanks DJ
 
Maybe Borg will stop by and give me a definative answer


Posted By: wistex
Date Posted: 17 September 2005 at 2:03pm
Simple place it in your footer file.  That way it appears on every page.
Don't worry about the BODY tags.  StatCounter's instructions are assuming that you are placing it on a simple html page.  If you place the StatCounter code in the footer, it is automatically placed between the BODY tags, which are elsewhere in the WWF code.
 
And, DJ, FYI StatCounter is a service that helps webmasters track visitor activity on their website.  http://www.statcounter.com/ - http://www.statcounter.com/
 
Hope that helps. Smile


-------------
http://www.wistex.com" rel="nofollow - WisTex Solutions
http://www.caribbeanchoice.com/forums" rel="nofollow - CaribbeanChoice Forums


Posted By: mike henson
Date Posted: 17 September 2005 at 6:35pm
Scott, as I said in my post, when I place the code in the footer.asp page it appears in-vision.
Regards
Mike
 


Posted By: dpyers
Date Posted: 17 September 2005 at 8:08pm
I don't know what appears in-vision means.

-------------

Lead me not into temptation... I know the short cut, follow me.


Posted By: mike henson
Date Posted: 18 September 2005 at 6:50am
It means the code is actually visible on the page when viewed in a web browser.


Posted By: dpyers
Date Posted: 18 September 2005 at 9:44am
Ahhh....
Sounds like the browser thinks the javascript is content - not code.

You need to surround the javascript with html script tags to indicate that it's code.

Right after the <body ....  > tag in header.asp put -

<SCRIPT LANGUAGE =" JavaScript">

   YOUR JAVA SCRIPT GOES HERE
</SCRIPT>


-------------

Lead me not into temptation... I know the short cut, follow me.


Posted By: mike henson
Date Posted: 18 September 2005 at 10:31am
The code already has that, or similar.
This is the code:
 
      <!-- Start of StatCounter Code -->
<script type="text/javascript" language="javascript">
var sc_project=000000;
var sc_partition=0;
var sc_security="00000000";
</script>
 
I have changed parameters for obvious reasons!
 
Regards
 
Mike
 


Posted By: dpyers
Date Posted: 18 September 2005 at 12:09pm
Can you post a url so we can see what happens?

-------------

Lead me not into temptation... I know the short cut, follow me.


Posted By: mike henson
Date Posted: 19 September 2005 at 5:47am
I prefer not to put up pages with code in-vision.
 
If you wish to test my problem just paste the code above into the footer.asp before the </body> tag on your own forum.
 
Regards
 
Mike
 


Posted By: wistex
Date Posted: 19 September 2005 at 4:10pm
Not sure why you are having a problem.  It works fine on my website.
 
http://www.caribbeanchoice.com/forums/ - http://www.caribbeanchoice.com/forums/
 
You will notice that I have StatCounter code in the lower left-hand corner.  I did place it in the header.asp file though instead of the footer.asp file.  But I do have other javascript code in footer.asp without a problem.
 
Perhaps you are placing it in the wrong place.  Are you placing it in the footer include, which is called includes/footer.asp?


-------------
http://www.wistex.com" rel="nofollow - WisTex Solutions
http://www.caribbeanchoice.com/forums" rel="nofollow - CaribbeanChoice Forums


Posted By: wistex
Date Posted: 19 September 2005 at 4:17pm
I just thought of something.  Are you using a WYSIWYG HTML Editor like FrontPage?  Sometimes WYSIWYG Editors mess with your code and if you cut and paste it a certain way, it mistakes it for readable text instead of html code.
 
I would suggest using Notepad or a non-WYSIWYG HTML Editor to change your WWF ASP files, if you aren't already.
 
Just thought I'd throw that out as a possibility of why you are having problems.


-------------
http://www.wistex.com" rel="nofollow - WisTex Solutions
http://www.caribbeanchoice.com/forums" rel="nofollow - CaribbeanChoice Forums


Posted By: dpyers
Date Posted: 19 September 2005 at 8:33pm
I get a message "Code Corrupted. Obtain fresh version" displayed but it doesn't display any code. Got same message and results when it was pasted in either header or footer .asp

If you're getting code displayed, it's likely that a tag is broken. Can you post your footer.asp with the javascript included?


-------------

Lead me not into temptation... I know the short cut, follow me.


Posted By: mike henson
Date Posted: 20 September 2005 at 6:05am
Thank you gentlemen for your replies.
 
I was using Dreamweaver in code view to paste the Statcounter code into includes/footer.asp
 
I will try pasting again using Notepad and if that fails I will post footer.asp here.
 
Kind regards
 
Mike
 
 


Posted By: mike henson
Date Posted: 20 September 2005 at 3:51pm
Well, as suggested, I pasted the code using notepad and it worked fine; is this another of the little idiosyncracies that keep emerging in Dreamweaver?
 
I am becoming more dissolutioned by Dreamweaver and find I can frequently get the job done faster with Namo Web Editor.
 
Dreamweaver makes the simplest tasks quite complex.
 
Thank you all for your contributions to this seemingly bizarre problem.   


Posted By: Skyforum
Date Posted: 29 September 2005 at 7:36pm
dreamweaver, frontpage, they all suck. edit-pro is a great tool as well as just using notepad.



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net