Adding Statcounter
GenoPro Home  |  Get Started With My Genealogy Tree  |  Buy  |  Login  |  Privacy  |  Search  |  Site Map
 
GenoPro Support Forum
Home        Members    Who's On
Welcome Guest ( Login | Register )
        


123»»»

Adding Statcounter Expand / Collapse
Author
Message
Post #16498 Posted 2/23/2007 5:05:29 PM


Forum Writer

Forum WriterForum WriterForum WriterForum WriterForum WriterForum WriterForum WriterForum Writer This user is a contributor to FamilyTrees.GenoPro.com 

Group: Customers
Last Login: 12/28/2008 6:54:57 PM
GenoPro Version: 2.0.1.6
Posts: 55, Visits: 166
Hi Folks,

I'm back to torture you.

I want to be able to add the wee programme "Statcounter" to my GP website so that I can see who is visiting my site.  It actually gives the IP addresses and a world map of where they live.

I have opened the index.html file in my Customised English Narrative Skin using Nopepad and inserted the code, as instructed from the Statcounter site, after <body>.  Seemed easy enough even for a dweeb like me.  But, no sign of my wee counter on my website, or the Statcounter icon.  And nothing on the webcounter site either.  In a much simpler genealogy hosting site, I was able to embed it just by copying the code onto the equivelant of "Document" on Generate Report.  I tried that too but with no success.

Please keep instuctions veeeeeeeeeeeeeery simple.

Thanks,

Boyd

Post #16500 Posted 2/23/2007 5:48:40 PM


Forum Writer

Forum WriterForum WriterForum WriterForum WriterForum WriterForum WriterForum WriterForum Writer This user is a contributor to FamilyTrees.GenoPro.com 

Group: Customers
Last Login: 12/28/2008 6:54:57 PM
GenoPro Version: 2.0.1.6
Posts: 55, Visits: 166
Sorry - I intended adding this to my previous thread on this topic but wrote in the wrong window.  Can they be amalgamated?
Post #16501 Posted 2/23/2007 5:52:43 PM


Forum Master

Forum MasterForum MasterForum MasterForum MasterForum MasterForum MasterForum MasterForum Master This user is an important contributor to the translation of GenoPro This user is an important contributor to the GenoPro community This user is a contributor to FamilyTrees.GenoPro.com 

Group: Customers
Last Login: Today @ 12:58:23 PM
GenoPro Version: 2.0.1.6
Posts: 758, Visits: 6,293
A) Just one idea, others may have others:
1) change line 36 in home.htm from


@[ Report.WriteText doc.Description ]@ to


@[ Report.Write doc.Description ]@

2) put your counter code into the Description field (under Generate Report > Document tab)
B) If you have the present introduction already there, I suggest you use an iframe and a separate htm file (like intro.htm or mycomments.htm) and show this content within the iframe (codes for this can be found on the internet). By doing so you do not have to scroll down the home.htm page to see most popular names and places. The counter code was pasted into toc_individual.htm after line 29.

A sample of idea B) is shown here:

Post #16505 Posted 2/23/2007 10:19:42 PM


Famous Writer

Famous WriterFamous WriterFamous WriterFamous WriterFamous WriterFamous WriterFamous WriterFamous Writer This user is an important contributor to the GenoPro community 

Group: Customers
Last Login: Yesterday @ 6:23:59 PM
GenoPro Version: 2.0.1.6
Posts: 441, Visits: 3,757
Hi Boyd,

I keep it in the "home.htm" file.   Just go to the bottom of the file and before the <body> (second last line)  insert the script that they supplied.   It should look something like this.


<!-- Start of StatCounter Code -->
<script type="text/javascript">
<!--
var sc_project=2094875;
var sc_invisible=1;
var sc_partition=19;
var sc_security="11cc1bba";
//-->
</script>

<script type="text/javascript" src="http://www.statcounter.com/counter/frames.js"></script><noscript><div class="statcounter"><a class="statcounter" href="http://www.statcounter.com/"><img class="statcounter" src="http://c20.statcounter.com/counter.php?sc_project=2094875&amp;java=0&amp;security=11cc1bba&amp;invisible=1" alt="javascript hit counter" /></a></div></noscript>
<!-- End of StatCounter Code -->

</body>
</html>

Cheers 

Poolzone  a mere cog in a revolution

Post #16513 Posted 2/24/2007 1:43:19 PM


Forum Writer

Forum WriterForum WriterForum WriterForum WriterForum WriterForum WriterForum WriterForum Writer This user is a contributor to FamilyTrees.GenoPro.com 

Group: Customers
Last Login: 12/28/2008 6:54:57 PM
GenoPro Version: 2.0.1.6
Posts: 55, Visits: 166
Nope, didn't work.  I am supposed to see it on the Home page, am I not - sort of down the bottom of the main pane?

I thought it might have something to do with my Stacounter code which has a bit extra after the End of Stacounter Code bit:

<!-- Start of StatCounter Code -->
<script type="text/javascript" language="javascript">
var sc_project=2094805;
var sc_invisible=0;
var sc_partition=19;
var sc_security="ac80c3cd";
</script>

<script type="text/javascript" language="javascript" src="http://www.statcounter.com/counter/frames.js"></script><noscript><a href="http://www.statcounter.com/" target="_blank"><img  src="http://c20.statcounter.com/counter.php?sc_project=2094805&amp;java=0&amp;security=ac80c3cd&amp;invisible=0" alt="best tracker" border="0"></a> </noscript>
<!-- End of StatCounter Code --><br><a href="http://my.statcounter.com/project/standard/stats.php?project_id=2094805&amp;guest=1">View My Stats</a>

So, I deleted the extra bit from my home.htm file but it still didn't work.

One other thing, can I be sure I am putting the code into the right place by clicking on "Edit skin" button on the "Generate Report" window and opening the Customised English Narrative Report folder which pops up (after I click OK on a warning that tells me I have to "...rename the folder to a different name...")?

I know you guys would sort this in seconds if you were here!

Boyd

Post #16514 Posted 2/24/2007 2:04:32 PM


Forum Writer

Forum WriterForum WriterForum WriterForum WriterForum WriterForum WriterForum WriterForum Writer This user is a contributor to FamilyTrees.GenoPro.com 

Group: Customers
Last Login: 12/28/2008 6:54:57 PM
GenoPro Version: 2.0.1.6
Posts: 55, Visits: 166
Still not working.

Becuase of the doubt about the code which I mentioned last time, I asked Statcounter to redo the code and this time it DID end at <!-- End of StatCounter Code -->:

<!-- Start of StatCounter Code -->
<script type="text/javascript" language="javascript">
var sc_project=2094805;
var sc_invisible=0;
var sc_partition=19;
var sc_security="ac80c3cd";
</script>

<script type="text/javascript" language="javascript" src="http://www.statcounter.com/counter/frames.js"></script><noscript><a href="http://www.statcounter.com/" target="_blank"><img  src="http://c20.statcounter.com/counter.php?sc_project=2094805&amp;java=0&amp;security=ac80c3cd&amp;invisible=0" alt="free web page hit counter" border="0"></a> </noscript>
<!-- End of StatCounter Code -->

I notice that Stacounter suggests placing it in the Index page:

"Using windows notepad, macintosh simpletext or any other simple text editor, open the file for the web page on which you want to install the counter (most likely, index.htm or index.html)"

but I have already tried this and it didn't work.  In fact the old code is still in there.  I have just replaced it with the new one and tried again - still no go.

One other thing Stacounter says is:

 "If you are using frames: When inserting the code, do not insert it on the page that contains the frameset tags. The code must go in the main content pages of your site."

Is that of any relevance?

Post #16516 Posted 2/24/2007 3:58:38 PM


Famous Writer

Famous WriterFamous WriterFamous WriterFamous WriterFamous WriterFamous WriterFamous WriterFamous Writer This user is an important contributor to the GenoPro community 

Group: Customers
Last Login: Yesterday @ 6:23:59 PM
GenoPro Version: 2.0.1.6
Posts: 441, Visits: 3,757
Hi Boyd,

My code will not 'show' the counter as I have chosen not to.    It is possible that you also have selected the option of making the label invisible.  Check your setup and installation criteria in Statcounter.  It will work fine without the counter being visible.

Genopro uses the Index file differently than Statcounter expects.  We ususally access the 'Default' page rather than the 'index' page, and so the statcounter would not get loaded. You will need to remove the entry from the 'Index' file for the entry on the 'home' page to be sure it will work.  I find using the 'home' page to be successful, and provides most information on hits.

If you install it on the 'home' page as I suggest, it WILL work.  Mine does.

Poolzone  a mere cog in a revolution

Post #16533 Posted 2/25/2007 4:01:19 PM


Forum Writer

Forum WriterForum WriterForum WriterForum WriterForum WriterForum WriterForum WriterForum Writer This user is a contributor to FamilyTrees.GenoPro.com 

Group: Customers
Last Login: 12/28/2008 6:54:57 PM
GenoPro Version: 2.0.1.6
Posts: 55, Visits: 166
Fraid not - I have done exactly as you said (well, I THINK I have done it exactly as you said) and still no luck.  Could (and would) you check my website and make sure it's not there?

Below is the entire code from my home.htm file - you can see where I have inserted the code as you suggested.

<%[@ IncludeFile "Code/Util.vbs" ]%>
<%[
Set doc = ReportGenerator.Document
Set oStringDictionaryNames = Session("oStringDictionaryNames")
strTitle = Session("Title")

InitGlobalVariables

]%><?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html
     PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<meta http-equiv="Content-Language" content="en"/>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title>@[ Report.WriteText strTitle ]@ - Report Summary</title>
<meta name="description" content="@[WriteMetaDescriptionReport]@" />
<meta name="keywords" content="@[WriteMetaKeywordsReport]@" />
<link rel="stylesheet" href="style.css" type="text/css"/>
<script src="script.js" type="text/javascript"></script>
</head>
<body
 onload="document.getElementById('divEnableScripting').style.display='none'; top.document.title='@[Report.Write Util.JavaScriptEncode(strTitle)]@'; if (self == parent) document.getElementById('divFrameset').style.display='block';">
<p>@[ Report.WriteFormattedLn Dic("FmtHtmlHomeIntro"), strTitle, Individuals.Count, Families.Count ]@
<%[
strFamilyTreeGno = ReportGenerator.ExtraFiles("FamilyTree.gno")
If (strFamilyTreeGno <> "") Then
 Report.WriteFormattedBr Dic("FmtHtmlHomeBrowser"), strFamilyTreeGno, Dic.FormatString("FmtAltViewGnoFile", Util.HtmlEncode(strTitle))
End If
]%>
</p><p>@[ Report.WriteText doc.Description ]@</p>
<br/>
<%[
iNameLast = oStringDictionaryNames.Count - 1
If (iNameLast > 19) Then
 iNameLast = 19  ' Keep only the first 20 families
End If
strFmtTemplate = "<a href='toc_individuals.htm#{0&t}' target='toc'>{0&t}</a>&nbsp;<small>({})</small>"
If g_fUseTreeIndexes Then strFmtTemplate = "<a href='toc_individuals.htm#{0&t}' onclick='explorerTreeOpenTo(parent.parent.toc, ""names"",""{0&j}"", 0, 1, ""2"");' target='toc'>{0&t}</a>&nbsp;<small>({})</small>"
cPlaces = Places.Count
]%>
<a name='MostPopular'></a>
<hr/>
<table class='table1'><tr><td@[Report.Write Util.IfElse(cPlaces > 0," width='49%'","")]@>
<h2>@[ Report.WriteTextDic "HomeMostPopularFamilyNames" ]@</h2>
<%[
strSep=""
For iName = 0 To iNameLast
 Report.WriteFormatted strSep & strFmtTemplate, oStringDictionaryNames.Key(iName), oStringDictionaryNames.KeyCounter(iName)
 strSep = ", "
Next

If g_fUseTreeIndexes Then
 Report.WriteBr Report.TagBr
 Report.WriteFormattedLn "<a href='toc_names.htm' target='popup' onclick='showPopUpFrame(""40%"");'><img src='images/toc_names.jpg' align='bottom' alt=''/>&nbsp;{}</a>", Dic("TocAZSurnameIndex")
End If

If cPLaces > 0 Then
 Report.WriteFormattedLn "</td><td width='2%'></td><td><h2>{}</h2>", Dic("TocIndexPlacesPopular")
 Places.SortBy("-Dependents.Count") ' Sort by most popular place
 iLast = Places.Count - 1
 If iLast > 19 Then iLast = 19

 strSep=""
 For i = 0 to iLast
   Set p = Places(i)
   Report.WriteFormatted strSep & "<a href='place-{0}.htm' onclick='showPopUpFrame("""");' title='{1&t}' target='popup'>{2&t}</a>&nbsp;<small>&nbsp;({3})</small>", p.id, p.Category, p, p.Dependents.Count
   strSep = ", "
 Next
End If
]%>

</td></tr></table>
<br/>
<div id="divEnableScripting"><hr/>
 <table width="80%" cellpadding="10">
  <tr>
   <td bgcolor="#FFFF00">@[Report.Write Dic("FmtHtmlHomeScripts")]@</td>
  </tr>
 </table><br/></div><hr/>
<p align="center"><small>@[Report.WriteFormatted Dic("FmtHtmlHomeSkin"), ReportGenerator.SoftwareVersion, FormatDateTime(Date(),1),
Util.IfElse(ReportGenerator.PathSkin, "", "custom "), ReportGenerator.SkinName, ReportGenerator.SkinVersion ]@.<br/><br/>

</small></p><div class="floatleft">
    <a href="http://validator.w3.org/about.html "target="_blank"><img
        src="images/valid-xhtml10.png"
        alt="Valid XHTML 1.0 Transitional" title="Valid XHTML 1.0 Transitional" height="31" width="88" /></a>
</div>
<p align="center"><a target="_blank" href="http://www.genopro.com/"><img src="images/genopro.logo.gif" alt="@[Report.Write Dic("AltGenoProLogo")]@" title="@[Report.Write Dic("AltGenoProLogo")]@" border="0" width="36" height="36"/></a></p>
<%[WriteHtmlFramesetSafeguard(oStringDictionaryNames.Count)]%>

<!-- Start of StatCounter Code -->
<script type="text/javascript" language="javascript">
var sc_project=2094805;
var sc_invisible=0;
var sc_partition=19;
var sc_security="ac80c3cd";
</script>

<script type="text/javascript" language="javascript" src="http://www.statcounter.com/counter/frames.js"></script><noscript><a href="http://www.statcounter.com/" target="_blank"><img  src="http://c20.statcounter.com/counter.php?sc_project=2094805&amp;java=0&amp;security=ac80c3cd&amp;invisible=0" alt="free web page hit counter" border="0"></a> </noscript>
<!-- End of StatCounter Code -->

</body>
</html>

Thanks for your help anyway.  I guess I will just have to give up.

Boyd

Post #16534 Posted 2/25/2007 4:18:07 PM


Forum Writer

Forum WriterForum WriterForum WriterForum WriterForum WriterForum WriterForum WriterForum Writer This user is a contributor to FamilyTrees.GenoPro.com 

Group: Customers
Last Login: 12/28/2008 6:54:57 PM
GenoPro Version: 2.0.1.6
Posts: 55, Visits: 166
Sheepish grin..............

It IS working.  There are stats at Stacounter.  I have had five visitors.

But honestly - I definitely did NOT clcik invisible and have checked - I chose the counter rather than the Statcounter icon - and it is just not there on any of my pages.

Anyway, that's down to me and Statcounter.

Thank you once again for all your help.......................

Nowwwwwwwwww - how do I make my email addy into a hyperlink like everyone else?

Post #16536 Posted 2/25/2007 5:53:46 PM


Famous Writer

Famous WriterFamous WriterFamous WriterFamous WriterFamous WriterFamous WriterFamous WriterFamous Writer This user is an important contributor to the GenoPro community 

Group: Customers
Last Login: Yesterday @ 6:23:59 PM
GenoPro Version: 2.0.1.6
Posts: 441, Visits: 3,757
Ok Boyd, you now need to edit the 'home.htm' file again and insert the following line ONLY THE THIRD LINE, you will find the others exist about half way down the file. Please do not use my email address, or you'll get that sheepish grin again.

]%>
</p><p>@[ Report.WriteText doc.Description ]@</p>
<p><a href="mailto:poolzone@optusnet.com.au">Contact the Writer at mailto:poolzone@optusnet.com.au</a></p>
<br/>
<%[

Poolzone  a mere cog in a revolution

« Prev Topic | Next Topic »

123»»»

Reading This Topic Expand / Collapse
Active Users: 0 (0 guests, 0 members, 0 anonymous members)
No members currently viewing this topic.
Forum Moderators: GenoProSupport, JcMorin, Ron

Permissions Expand / Collapse

All times are GMT -5:00, Time now is 1:51 PM

Copyright 1998-2009 GenoPro. All rights reserved. GenoPro and the GenoPro logo are trademarks.