Support Forums

counter : once per session

This is a discussion on counter : once per session within the Technical Support forums, part of the Technical Support Forums category; Hi, One of the most important thing that my customers are searching is the statistics of their listing. The counter ...


Go Back   68 Classifieds Forums > Technical Support Forums > Technical Support

This topic is resolved.

If you have a similar issue that this thread does not address, open a new related support topic.

 
Thread Tools Display Modes
Old 12-12-2008, 03:12 AM   #1
Senior Member
 
frommarcq's Avatar
 
Join Date: Mar 2006
Location: Lille (France)
Posts: 111
Rep Power: 20
frommarcq is on a distinguished road
Talking counter : once per session

Hi,

One of the most important thing that my customers are searching is the statistics of their listing.

The counter is really useful to prove that the page is seen, but some of my customers told me that this function isn't really sharp : if you refresh the same page in your browser, it counts like a new visit.

According to me, the answer is to have a 'once per session' counter. A visitor is counted once, even if s/he visits the same page one thousand times !

I found a php code, and want to have your point of view about it. How (and where) to implement such a code ?
PHP Code:
<?php
session_start
();
if (
is_null($_SESSION['first_time']))
{
$_SESSION['first_time'] = 'Nope :D';
}
else
{
// It's their first time...
print "welcome";
}
?>
Regards,

Pascal

PS : Would it be difficult to create an 'advanced counter' module (with the number of visits day by day) ?
__________________
68classifieds (V4.0.9Developer)

maison nord - appartement Lille - maison lens - meteo Lille - restaurants Lievin
frommarcq is offline  
Old 12-14-2008, 05:22 AM   #2
Senior Member
 
frommarcq's Avatar
 
Join Date: Mar 2006
Location: Lille (France)
Posts: 111
Rep Power: 20
frommarcq is on a distinguished road
Default

Any suggestion ?
lol
Pascal
__________________
68classifieds (V4.0.9Developer)

maison nord - appartement Lille - maison lens - meteo Lille - restaurants Lievin
frommarcq is offline  
Old 12-14-2008, 02:38 PM   #3
Moderator
 
juven14's Avatar
 
Join Date: Mar 2006
Location: Texas
Posts: 1,998
Rep Power: 60
juven14 is a jewel in the rough
Default

This really isn't suited for a module since the update happens via the core. The only thing I could think of is to count their first visit to the page, after that just subtract 1 from the counter. Not perfect, editing the core file and preventing the additional hits would probably be ideal vs creating a module that subtracts.

Honestly, I think having the counter when the page is loaded is fine. As long as you are not stating that they are page views per visitor per session. If you follow the logic, wouldn't you want to discount any further page view for that user? What's the difference per session and per next day. Also, per session doesn't really work either. What happens if they close their browser and go back to the site 5 min later and view the same page?
__________________
John Snyder
PHP Developer
juven14 is offline  
Closed Thread

Tags
counter , once per session , session , visit

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Total hits counter philoo Modules / Plugins / Modifications 2 11-22-2008 12:55 PM
Total ads counter philoo Technical Support 6 09-17-2008 05:06 PM


All times are GMT -4. The time now is 11:21 PM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0