counter installation counter installation
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

counter installation

Started by claude258, December 02, 2005, 02:13:36 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

claude258

I added a stats counter (from statcounter.com) in template.html and everything works fine. I can read all the stats if I go on the statcounter.com web site and stats are not showed on my site.

With Statcounter we can install 2 different counters:
1) number of visitors
2) page views

I would like to know how to display those counter on a stats.php page. How can I do that? Where do I add the codes?



Stramm

I do not quite understand! Does it work or not? However if your question is how to add php code then do that in the anycontent.php (read the manual)

claude258

In fact, what I would like to do is to install a counter (html) that will track every pages and I would like to display the counter number only on a specific page (lets say stats.php).


Stramm

I do not know the counter system... how they display stats and if it's possible to grab them and display them otherwhere that on the counter homesite. Better you ask these guys

claude258

I can install the html code (from statcounter.com) on a page and it will display the number of visitor (or the pageviews).

But I think my question can apply to the installation of any hit counter.

If I want to track every pages so I put the counter in template.html (yes?). But how to display the results in another page (stats.php for exemple).

I would like to simply show something like:
Total number of visitor on the site: 2482
Total page views: 14589

Is it possible?

Thanks.   

Joachim Müller

as suggested above: the technology counter scripts use may differ, so there can be no general recommendation. Plain JavaScript counters can easily be added to template.html, while database-driven counters will have to be added differently. We (the dev team) have no diea of the counter you're trying to implement, nor am I inclined to look into your counter script and do all the work for you. Of course it is possible to implement nearly any kind of counter script, but it needs looking into , coding skills and a good understanding how coppermine works.
If another page holds all the info you need, add a link to it, using the mechanisms in theme.php or tenplate.html. If you need to include a PHP script, use the custom header/footer field (if the php script you want to use doesn't need to perform header manipulation).
Why are you so eager to have stats? Nobody needs them except the admin, so you should implement one that is visible for the admin only, preferably one that hooks on the server data like awstats. You have to understand that every counter means performance penalties as well.