« Home | Next: Got Hacks? »
| Next: Template Tricks »
| Next: Wishlist »



Monday, April 04, 2005

Stats Hack: Show your page stats

Use this hack, combined with StatCounter's free website stats application to graphically show your page stats on a website of your choice. See an example on this page.

Using this hack?
Please leave a comment to this post with your website URL

To use:
Copy the following code to your website, editing the first two variables (see comments in the code for details.
Note: Please keep the web friendly--if you use this hack, link back to this post!

Click the "Read More" link, below, to see the code:
<script language="JavaScript">
<!--
//++++++++++++++++++++++++++++++++++++ STATS HACK +++++++++++++++++++++++++++++++++++++
//
// written by Robert Merrill
// http://point-n-click.blogspot.com/2005/01/statshack-show-your-page-stats.html
//
// This code is provided free of charge and without support, warranty, and liability
// Please keep reference intact, pointing users to http://point-n-click.blogspot.com/2005/01/statshack-show-your-page-stats.html
//
// To scroll users to the graph on your page, use the code: <a href="#seeStats">See page statistics</a>
//
//++++++++++++++++++++++++++++++++++++ STATS HACK +++++++++++++++++++++++++++++++++++++
//Step One: What is your STATCOUNTER Project ID Number? Default is '513981', the ProjectID for http://point-n-click.blogspot.com
scProjectId = 513981

//Step Two: How many DAYS of stats do you want to show? Default is 15
scNumDays = 15

//Step Three: Sit back and watch your stats graph appear on the page
ed = new Date();
bd = new Date(ed.getFullYear(),ed.getMonth(),ed.getDate()-scNumDays)
bdStr = bd.getFullYear() + '-' + (bd.getMonth()+ 1) + '-' + bd.getDate();
edStr = ed.getFullYear() + '-' + (ed.getMonth()+ 1) + '-' + ed.getDate();
document.write('<a name="seeStats"></a><span class="siteStatisticsGraph">Our statistics for the last ' + scNumDays + ' days:<br>')
document.write('<a href="http://my.statcounter.com/project/standard/stats.php?project_id=' + scProjectId + '&guest=1">')
document.write('<img border="0" src="http://my.statcounter.com/project/standard/graph_daily_summary.php?hide_page_loads=0&project_id=' + scProjectId + '&startDate=' + bdStr + '&endDate=' + edStr + '&guest=1">')
document.write('</a><br> StatsHack provided by <a href="http://point-n-click.blogspot.com/2005/01/statshack-show-your-page-stats.html">Point-N-Click</a></span>')
//++++++++++++++++++++++++++++++++++ END STATS HACK +++++++++++++++++++++++++++++++++++++
//-->
</script>

Code conversion powered by SimpleCode


0 Comments:

Post a Comment

<< Home

Other Recent Posts

Powered by Newsgator
Technorati search

Noted Links & Offers:

There's nothing like getting stuff for free. These offers are a lot like that!





Internet Services

Sick of the World Wide Wait? Upgrade your Internet:

Netscape Internet Service - Unlimited access, personalized email and search enhanced by Google. Try it! Only $9.95/mo.

Up to 5X faster than regular dial-up! Try PeoplePC Online Accelerated 3 months, half price and then pay just $15.95/month.

Download CallWave (Free!) and never miss another call while you're online.

Blogs You Should Visit

megabits per second
How to get the most out of your Internet service. Broadband, hi-speed Internet, tips, networking, hacks and the broadband buzz...

Point-N-Click
This blog is why blogs were invented. Like the kicker says, "Save your bandwidth, the cool stuff is already here."

Contributors Wanted

Do you like tweaking templates? Are you a Blogger fan? If you want to be a contributor and get famous (or, at least get blogged about), let us know! Email templatetrickster at gmail dot com

Archives

April 2005

November 2005

December 2005

January 2006