Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Help Groups for Snitz Forums 2000 Users
 Help: MOD Implementation
 Google analytics..
 New Topic  Topic Locked
 Printer Friendly
Previous Page
Author Previous Topic Topic Next Topic
Page: of 2

balexandre
Junior Member

Denmark
418 Posts

Posted - 14 January 2009 :  07:59:56  Show Profile  Visit balexandre's Homepage  Send balexandre an ICQ Message
the script should always be in the <HEAD> tag, that's were the scripts should be!

if you want to include in the <BODY> at least you need to include it before the closing tag </BODY>

so this:


   Response.write "</table>" & vbNewLine
end if
response.write "</body>" & vbNewLine & _
"</html>" & vbNewLine

my_Conn.Close
set my_Conn = nothing 
%>


should became this:



  Response.write "</table>" & vbNewLine
end if
%>
<!-- START 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-5279273-1");
pageTracker._trackPageview();
} catch(err) {}</script>

<!-- END GOOGLE ANALYTICS -->
<%
response.write "</body>" & vbNewLine & _
"</html>" & vbNewLine

my_Conn.Close
set my_Conn = nothing 
%>
<

Bruno Alexandre
(Strøby, DANMARK)

"a Portuguese in Danmark"



Edited by - balexandre on 14 January 2009 08:00:43
Go to Top of Page

HuwR
Forum Admin

United Kingdom
20584 Posts

Posted - 14 January 2009 :  09:08:33  Show Profile  Visit HuwR's Homepage
quote:
the script should always be in the <HEAD> tag, that's were the scripts should be!
not according to google, according to google the code should go above the terminating body tag not in the header,it is placed there is so that the js runs when the page has finished loading rather then when the header is loaded, so it accurately records page loads rather than half loaded aborted pages, it can go anywhere else in the body tag, but it is preferable at the bottom so that page views are more accurate.<
Go to Top of Page

balexandre
Junior Member

Denmark
418 Posts

Posted - 14 January 2009 :  10:23:46  Show Profile  Visit balexandre's Homepage  Send balexandre an ICQ Message
I said from the HTML specs, Google is just a company, are we all google dependents? if they say jump, will we jump?

shouldn't we develop proper code, and follow what standards are?

This is a lot to make a conversation of, I'm done by here!

if you wanna run scripts when the documents ends loading how about:

$(document).ready(function() {
// do stuff when DOM is ready
});
<

Bruno Alexandre
(Strøby, DANMARK)

"a Portuguese in Danmark"


Go to Top of Page

AnonJr
Moderator

United States
5768 Posts

Posted - 14 January 2009 :  10:33:55  Show Profile  Visit AnonJr's Homepage
The standards say you can put scripts wherever the hell you want to, but preference the <head> - if you're going to use Google Analytics, than you may want to do as Google reccomends for Google's product.<
Go to Top of Page

HuwR
Forum Admin

United Kingdom
20584 Posts

Posted - 14 January 2009 :  10:46:30  Show Profile  Visit HuwR's Homepage
quote:
Originally posted by balexandre

I said from the HTML specs, Google is just a company, are we all google dependents? if they say jump, will we jump?

shouldn't we develop proper code, and follow what standards are?

This is a lot to make a conversation of, I'm done by here!

if you wanna run scripts when the documents ends loading how about:

$(document).ready(function() {
// do stuff when DOM is ready
});



you didn't mention any specs in your post, and it is googles code so you should listen to google and put it where they bloody tell you to. there is nothing 'unproper' about googles code or where they want you to put it<
Go to Top of Page

Podge
Support Moderator

Ireland
3775 Posts

Posted - 14 January 2009 :  10:54:52  Show Profile  Send Podge an ICQ Message  Send Podge a Yahoo! Message
This is the easiest way for you to include the code. Look for the red line. Don't forget to include the script tags before and after <% %>.

I recommend that you start with an unedited inc_footer.asp unless you have mods that require changes to inc_footer.asp

<%
'#################################################################################
'## Snitz Forums 2000 v3.4.06
'#################################################################################
'## Copyright (C) 2000-06 Michael Anderson, Pierre Gorissen,
'## Huw Reddick and Richard Kinser
'##
'## This program is free software; you can redistribute it and/or
'## modify it under the terms of the GNU General Public License
'## as published by the Free Software Foundation; either version 2
'## of the License, or (at your option) any later version.
'##
'## All copyright notices regarding Snitz Forums 2000
'## must remain intact in the scripts and in the outputted HTML
'## The "powered by" text/logo with a link back to
'## http://forum.snitz.com in the footer of the pages MUST
'## remain visible when the pages are viewed on the internet or intranet.
'##
'## This program is distributed in the hope that it will be useful,
'## but WITHOUT ANY WARRANTY; without even the implied warranty of
'## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
'## GNU General Public License for more details.
'##
'## You should have received a copy of the GNU General Public License
'## along with this program; if not, write to the Free Software
'## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
'##
'## Support can be obtained from our support forums at:
'## http://forum.snitz.com
'##
'## Correspondence and Marketing Questions can be sent to:
'## manderson@snitz.com
'##
'#################################################################################


Response.Write " </td>" & vbNewLine & _
" </tr>" & vbNewLine & _
"</table>" & vbNewLine & _
"<table width=""95%"" align=""center"" border=""0"" bgcolor=""" & strForumCellColor & """ cellpadding=""0"" cellspacing=""1"">" & vbNewLine & _
" <tr>" & vbNewLine & _
" <td>" & vbNewLine & _
" <table border=""0"" width=""100%"" align=""center"" cellpadding=""4"" cellspacing=""0"">" & vbNewLine & _
" <tr>" & vbNewLine & _
" <td bgcolor=""" & strForumCellColor & """ align=""left"" valign=""top"" nowrap><font face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize & """ color=""" & strForumFontColor & """>" & strForumTitle & "</font></td>" & vbNewLine & _
" <td bgcolor=""" & strForumCellColor & """ align=""right"" valign=""top"" nowrap><font face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize & """ color=""" & strForumFontColor & """>© " & strCopyright & "</font></td>" & vbNewLine & _
" <td bgcolor=""" & strForumCellColor & """ width=""10"" nowrap><a href=""#top""" & dWStatus("Go To Top Of Page...") & " tabindex=""-1"">" & getCurrentIcon(strIconGoUp,"Go To Top Of Page","align=""right""") & "</a></td>" & vbNewLine & _
" </tr>" & vbNewLine & _
" </table>" & vbNewLine & _
" </td>" & vbNewLine & _
" </tr>" & vbNewLine & _
"</table>" & vbNewLine & _
"<table border=""0"" width=""95%"" align=""center"" cellpadding=""4"" cellspacing=""0"">" & vbNewLine & _
" <tr valign=""top"">" & vbNewLine
if strShowTimer = "1" then
Response.Write " <td align=""left""><font face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize & """>" & chkString(replace(strTimerPhrase, "[TIMER]", abs(round(StopTimer(1), 2)), 1, -1, 1),"display") & "</font></td>" & vbNewLine
end if
Response.Write " <td align=""right""><font face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize & """>"


'## START - REMOVAL, MODIFICATION OR CIRCUMVENTING THIS CODE WILL VIOLATE THE SNITZ FORUMS 2000 LICENSE AGREEMENT
Response.Write "<a href=""http://forum.snitz.com"" target=""_blank"" tabindex=""-1""><acronym title=""Powered By: " & strVersion & """>"
if strShowImagePoweredBy = "1" then
Response.Write getCurrentIcon("logo_powered_by.gif||","Powered By: " & strVersion,"")
else
Response.Write "Snitz Forums 2000"
end if
Response.Write "</acronym></a></font></td>" & vbNewline

'## END - REMOVAL, MODIFICATION OR CIRCUMVENTING THIS CODE WILL VIOLATE THE SNITZ FORUMS 2000 LICENSE AGREEMENT


Response.Write " </tr>" & vbNewLine & _


"</table>" & vbNewLine
if strSiteIntegEnabled = "1" then
if strSiteRight = "1" then
Response.Write " </td>" & vbNewLine & _
" <td valign=""top"">" & vbNewLine
%><!--#include file="inc_site_right.asp"--><%
end if
Response.Write " </td>" & vbNewLine & _
" </tr>" & vbNewLine
if strSiteFooter = "1" then
Response.write " <tr>" & vbNewLine & _
" <td"
if strSiteLeft = "1" or strSiteRight = "1" then
if strSiteLeft = "1" and strSiteRight = "1" then
Response.write " colspan=""3"""
else
Response.write " colspan=""2"""
end if
end if
Response.write ">"
%><!--#include file="inc_site_footer.asp"--><%
Response.write " </td>" & vbNewLine & _
" </tr>" & vbNewLine
end if
Response.write "</table>" & vbNewLine
end if
<%
Insert unedited Google code here.
%>
response.write "</body>" & vbNewLine & _

"</html>" & vbNewLine

my_Conn.Close
set my_Conn = nothing
%>
<

Podge.

The Hunger Site - Click to donate free food | My Blog | Snitz 3.4.05 AutoInstall (Beta!)

My Mods: CAPTCHA Mod | GateKeeper Mod
Tutorial: Enable subscriptions on your board

Warning: The post above or below may contain nuts.

Edited by - Podge on 14 January 2009 10:55:44
Go to Top of Page

balexandre
Junior Member

Denmark
418 Posts

Posted - 14 January 2009 :  11:24:44  Show Profile  Visit balexandre's Homepage  Send balexandre an ICQ Message
I would love to know why you double post my post?<

Bruno Alexandre
(Strøby, DANMARK)

"a Portuguese in Danmark"


Go to Top of Page

akintosyali
Starting Member

23 Posts

Posted - 14 January 2009 :  11:37:03  Show Profile
it worked!! awesome!!
Thanks everyone!!<
Go to Top of Page

Podge
Support Moderator

Ireland
3775 Posts

Posted - 14 January 2009 :  11:55:14  Show Profile  Send Podge an ICQ Message  Send Podge a Yahoo! Message
You're welcome.<

Podge.

The Hunger Site - Click to donate free food | My Blog | Snitz 3.4.05 AutoInstall (Beta!)

My Mods: CAPTCHA Mod | GateKeeper Mod
Tutorial: Enable subscriptions on your board

Warning: The post above or below may contain nuts.
Go to Top of Page

sikandar
Junior Member

Pakistan
135 Posts

Posted - 24 January 2009 :  10:06:57  Show Profile
To add the tracking code to your ASP site, add the following line to each template page for your site before the closing tag: <!--#include file="analytics.asp"--> Then, upload a file called analytics.asp to your site. This file should contain your tracking code:

http://www.google.com/support/googleanalytics/bin/static.py?page=troubleshooter.cs&problem=gatsc&selected=a1_a1h2_a1h2t4&ctx=gatsc_a1_a1h2_a1h2t4_55505<
Go to Top of Page
Page: of 2 Previous Topic Topic Next Topic  
Previous Page
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.36 seconds. Powered By: Snitz Forums 2000 Version 3.4.07