Welcome! Please Login or Register!
April 25, 2024, 08:29:53 AM
Home Login Register
pftq Forums  |  Software and Scripts  |  Other Scripts and Tools  |  pq Visitor Counter and Tracker - Questions, Comments, and FAQ 0 Members and 1 Guest are viewing this topic. « previous next »
Latest News!Lunar Trigger(Aug 27, 2023)
Pages: [1] Print
Author Topic: pq Visitor Counter and Tracker - Questions, Comments, and FAQ  (Read 17787 times)
pftq
Administrator
*****
Offline Offline



Posts: 4198

WWW
« on: August 30, 2007, 09:50:51 PM »

Just realized there was no where for discussion on the pq Visitor Counter and Tracker - received a few emails about that.  So... if you have any problems, want to suggest something, or just want to say anything about the counter, feel free to do so here. Smiley

FAQ:
Got several of these in emails.  Everyone please remember just how extensive the counter's features are.  Before asking, double-check that your requested feature doesn't already exist.  Grin

The number of visitors gets corrupted because of visitors with roaming IP adresses. Is it possible to use the first 3 IP segments in order to prevent this kind of miscount?
     Take a look at $iplength - it does exactly that.

Is it possible to prevent counting a specific complete IP-address? (my own ip for example)
     $noip - it's meant for bots but you can certainly add your own ip and have it ignored as well.  For full IPs, just not use wildcards and go all the way to the 4th segment.

How do I view counter stats without being counted?
     On your pages (example in the included index.php for the tracker):
$discount_counter - any page with this set to true disables the counter from counting, but you can still view (as the tracker does).
« Last Edit: February 04, 2008, 06:33:03 PM by pftq » Logged
tyepilot
Member
*****
Offline Offline

Posts: 1

« Reply #1 on: December 28, 2007, 10:33:22 AM »

I was wondering if you can help me. I downloaded the script for the counter and its seems to be uploaded fine but it's not tracking or counting anything.

The instructions for customizing everything was a bit confusing. Such as this from your demo:Site Statistics for pftq.com
<?php include("pqcounter.php"); ?> at top of PHP file
75500
Total VISITORS
(<?php echo stat_("total"); ?>)

4
Current VISITORS Online
(<?php echo $activenum; ?>)

Where does this go? <?php echo $activenum; ?> In the html pages I want counted?

Please let me know.

Thanks for all your help.

Ron
Logged
pftq
Administrator
*****
Offline Offline



Posts: 4198

WWW
« Reply #2 on: December 29, 2007, 07:40:05 AM »

Hi

This "<?php echo $activenum; ?>" only goes where you want the "Current VISITORS Online" to be displayed as shown in the example.

Similarily "<?php echo stat_("total"); ?>" shows the total visitors.  Perhaps this'll help you see the example better.

The only thing you must have in your PHP file is <?php include("pqcounter.php"); ?> before everything else.  That loads up the script.  It also counts the page automatically.  Also it should include the path to the counter file.

So if your file structure is like this:

root/
 pqcounter.php
 folder/
   page.php

page.php should have: <?php include("../pqcounter.php"); ?> because the counter file is one folder up.
« Last Edit: December 29, 2007, 07:42:41 AM by pftq » Logged
pftq
Administrator
*****
Offline Offline



Posts: 4198

WWW
« Reply #3 on: February 04, 2008, 06:32:05 PM »

Started an FAQ after several repeated questions.  Hopefully others will find this information useful:

The number of visitors gets corrupted because of visitors with roaming IP adresses. Is it possible to use the first 3 IP segments in order to prevent this kind of miscount?
     Take a look at $iplength - it does exactly that.

Is it possible to prevent counting a specific complete IP-address? (my own ip for example)
     $noip - it's meant for bots but you can certainly add your own ip and have it ignored as well.  For full IPs, just not use wildcards and go all the way to the 4th segment.

How do I view counter stats without being counted?
     On your pages (example in the included index.php for the tracker):
$discount_counter - any page with this set to true disables the counter from counting, but you can still view (as the tracker does).
Logged
royhink
Member
*****
Offline Offline

Posts: 1

« Reply #4 on: July 23, 2008, 03:41:01 PM »

Hi,

I've got a subscription site (GlobalRoadWarrior.com) marketing to university libraries that authenticate by IP range for access. I am looking for a counter that can tell me how much traffic is coming from each library. It must include unique visitors.

I've looked at log analyzers but found that they use the IP address to identify unique visitors. Since visitors are logging in from a library workstation, and all are using their IP range, this would not give me accurate user statistics.

So, I am looking for a script that can identify individual visitors from each library's IP range.

Is there a way your counter/tracker can do this? Could it perhaps track unique "sessions"?

Thanks, any help appreciated.

Roy Hinkelman
707-778-1124 X211
roy@worldtradepress.com
Logged
pftq
Administrator
*****
Offline Offline



Posts: 4198

WWW
« Reply #5 on: July 23, 2008, 07:08:57 PM »

Hi, if you mean track the number of sessions from each user (ie PHP $_SERVER sessions), my counter does not do that, sorry.

However, from each IP, it does log for x minutes before recounting the same IP again - this it would count as a "visit".

I'm sorry if I don't have what you're looking for - if you could explain a bit more detail, perhaps in some future version I could include it. Smiley
Logged
backpalm
Member
*****
Offline Offline

Posts: 1

« Reply #6 on: August 10, 2008, 09:14:39 AM »


How do I view counter stats without being counted?
     On your pages (example in the included index.php for the tracker):
$discount_counter - any page with this set to true disables the counter from counting, but you can still view (as the tracker does).
I must be not using the discount_counter snippet correctly as it keeps counting the page...
I suspect my limited PHP skills to be the reason. Any help will be highly appreciated.
Here is my code:
...
<body>
<?php include("counter.php"); ?>
<?php $discount_counter=true; ?>
...
<?php echo stat_("todaycount"); ?>
...
</body>
Logged
pftq
Administrator
*****
Offline Offline



Posts: 4198

WWW
« Reply #7 on: September 07, 2008, 01:56:21 PM »

Have the discount BEFORE you include the counter. Smiley
Logged
cyberdyne
Member
*****
Offline Offline

Posts: 4

« Reply #8 on: January 25, 2012, 06:23:58 PM »

Thanks for a great script.
If I add the include on, eg: 5 pages, will the counter on the main index page count the visitor total on all 5 pages or each page individually ?
Logged
pftq
Administrator
*****
Offline Offline



Posts: 4198

WWW
« Reply #9 on: January 27, 2012, 03:10:34 PM »

It is accumulative for the whole site - so it totals all 5 pages.  You can change the counter table setting for each page if you want to count separately though.
Logged
cyberdyne
Member
*****
Offline Offline

Posts: 4

« Reply #10 on: January 30, 2012, 04:06:45 AM »

No, that sounds fine for my needs, thank you.

Which is the best variable to change to stop the total resetting ? ie, to have a continuous running total of visitors?
Thanks
Logged
cyberdyne
Member
*****
Offline Offline

Posts: 4

« Reply #11 on: January 31, 2012, 03:47:06 AM »

Any idea which is the best place to include the code into a Coppermine Gallery Simple Machines Forum (SMF) (done that) please?
Thanks
« Last Edit: February 01, 2012, 12:37:04 PM by cyberdyne » Logged
pftq
Administrator
*****
Offline Offline



Posts: 4198

WWW
« Reply #12 on: February 01, 2012, 03:14:15 PM »

The total doesn't reset as far as I'm aware, but visitors will be recounted if they visit after a period longer than the $duration setting.

For Coppermine, I include it in the /gallery/include/init.inc.php file at the top.  Alternatively, you can do so in the theme.php of your theme if you don't want to mod the init file after every gallery update.
Logged
cyberdyne
Member
*****
Offline Offline

Posts: 4

« Reply #13 on: February 01, 2012, 03:19:54 PM »

I tried the theme files and had trouble getting it to work, so I've just added it to the init.inc.php and it worked first time.
Many thanks
Logged
Pages: [1] Print 
pftq Forums  |  Software and Scripts  |  Other Scripts and Tools  |  pq Visitor Counter and Tracker - Questions, Comments, and FAQ « previous next »
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2006-2007, Simple Machines | RSS Feed Valid XHTML 1.0! Valid CSS!
Page created in 0.147 seconds with 21 queries.