View Full Version : Tracking Linked Pages
Nikkodemus
09-23-2004, 12:41 AM
Have pages showing details of horses with links to their competition results (See Performance). Have inserted the StatCounter code in the Performance pages (Excel) but visits do not appear in the stats.
An example at: http://www.mypage.tsn.cc/fsh/thehorses.htm
Is there any way to track these visits?
webado
09-23-2004, 01:16 AM
The code is not in the html version of your excel pages, so whatever you did didn't work in Excel.
You can add it manually unless it's a big burden if the pages change often.
I'll have to test a bit of excel and see how it could be done if it can.
webado
09-23-2004, 01:59 AM
Oh, this works a beaut!
Create a very simple html file like this, and save it under some name, say: my-xls.htm
You can customize it all you want as well (e.g. proper title), but keep it simple still. Insert the statcounter code at the bottom or at the top, centered or not, as you wish.
<html>
<head>
<title>My table</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<hr>
<script type="text/javascript" language="javascript">
var sc_project=999999;
var sc_invisible=1; // if you want it invisible
var sc_partition=1; // whatever partition you have
</script>
<script type="text/javascript" language="javascript" src="http://www.statcounter.com/counter/counter.js"></script><noscript>http://c2.statcounter.com/counter.php?sc_project=999999&java=0 (http://www.statcounter.com/) </noscript>
</body>
</html>
When you are in Excel and you generate the html page for the spreadsheet, instead of creating an independent, ready-to view html file, pick the second option, to insert the table into an existing html file, and use the one you just created above, my-xls.htm . It will take this as a sort of template and insert the html code created for the excel table right in the line .
Let it save it under some other name, say my-final-xls.htm. That's it. This file can now be published to the web, and you can link to it and it will track your visitors.
Somewhere in this process in Excel you can also ask it to use and create .html files instead of it's default .htm - but that's just a detail.
Nikkodemus
09-23-2004, 02:25 AM
Thanks Christina.
I inserted the code right at the end of the pages, between the </table> and </body> tags. Previewed in IE6, checked the code, all OK. FTP'd the files to my server.
But you're right, when I access and view the source code via the web, the StatCounter code isn't there! Will experiment a bit more at this end as well.
Cheers,
Nick
PS:I bet my wife yours would be the first response - but thought the time difference might have slowed you down :!:
Nikkodemus
09-23-2004, 02:33 AM
[quote="chrisooc"]Oh, this works a beaut! [quote]
Many thanks :D
Have to go out for a while, but will get to it later today.
Thanks again,
Nick
webado
09-23-2004, 03:06 AM
Hmmm, it might be because of the version of Excel you have (I use Office 97), and yours appears to create a much more ellaborate output than mine.
Is the output generated on the fly by any chance? It seems to make an xml thing, which mine doesn't.
Anyway, see mine at work at http://widget.webado.com/excel/final-test-xls.htm (it's an old spreadsheet I used for an informal song contest a while back :lol: ).
Nikkodemus
09-23-2004, 08:36 AM
Using Excel 2000 and don't have the same options! Could install Off97 on another machine but....
Using Dreamweaver with some hand coding. Added the StatCounter code in Dreamweaver after Saving for Web in Excel (came up as *.htm, *.html). Dreamweaver can only import *.csv or *.txt.
What I will try next (probaly tomorrow) is inserting the SC code while still in Excel. That might fix it?
Agree the code generated by XL2000 seems to go on forever compared with yours.
Thanks again, will report further
Nick
webado
09-23-2004, 01:00 PM
Using Excel 2000 and don't have the same options! Could install Off97 on another machine but....
Using Dreamweaver with some hand coding. Added the StatCounter code in Dreamweaver after Saving for Web in Excel (came up as *.htm, *.html). Dreamweaver can only import *.csv or *.txt.
What I will try next (probaly tomorrow) is inserting the SC code while still in Excel. That might fix it?
Agree the code generated by XL2000 seems to go on forever compared with yours.
Thanks again, will report further
Nick
Hmmm... I'll try this at work, but there we have Office XP with its own set of quirks. Later today, maybe.
Nikkodemus
09-23-2004, 10:05 PM
Inserted the SC code in XL2000 using the horse Smooth as a test.
FTP'd it and checked on the web. The code was there OK - but the whole coding looks kinda strange to me.
Did a test visit but doesn't appear in the stats - still no good :(
Have a copy of Off2003 on my Notebook. Will have play as possibly it generates code more effectively.
webado
09-23-2004, 11:10 PM
Inserted the SC code in XL2000 using the horse Smooth as a test.
FTP'd it and checked on the web. The code was there OK - but the whole coding looks kinda strange to me.
Did a test visit but doesn't appear in the stats - still no good :(
Have a copy of Off2003 on my Notebook. Will have play as possibly it generates code more effectively.
LOL! NIkko! You copied my code exactly! I have it generic using project number 999999! You are suppsoed to generate your own code and use that one instead! :lol:
It will work if you do this right, guaranteed!
Nikkodemus
09-24-2004, 10:04 AM
Ouch...you're absolutely correct! I grabbed it from your post without thinking....as it was handy.
Will try and get it right next time :oops:
May be a slight delay while I experiment - and, hey, it is the weekend :lol:
Merci!
Nick
webado
09-24-2004, 12:11 PM
Ouch...you're absolutely correct! I grabbed it from your post without thinking....as it was handy.
Will try and get it right next time :oops:
May be a slight delay while I experiment - and, hey, it is the weekend :lol:
Merci!
Nick
Yes, your weekend starts earlier than mine, but it also ends earlier :twisted: :lol:
Nikkodemus
09-25-2004, 12:32 AM
Even if it is the weekend, could't resist checking that it did indeed work... and IT DOES!! :lol:
Won't mix programs for editing in future when auto generating code and won't use somone else's StatCounter code!
Many thanks again for your help and patience, Christina, and have a great weekend.
Nick
webado
09-25-2004, 12:39 AM
Even if it is the weekend, could't resist checking that it did indeed work... and IT DOES!! :lol:
Won't mix programs for editing in future when auto generating code and won't use somone else's StatCounter code!
Many thanks again for your help and patience, Christina, and have a great weekend.
Nick
LOL! You're welcome, and a good weekend to you too. Good thing I didn't use my own project code in the example then, or I'd be joining all those wondering what's going on with strange pages showing up in my stats :lol:
vBulletin® v3.8.5, Copyright ©2000-2013, Jelsoft Enterprises Ltd.