Start ::
Developers Corner ::
Block Development ::
stats count trouble
Moderated by: Support Team
-
- rank:
-
pnFreshman
- registered:
- April 2008
- Status:
- offline
- last visit:
- 04.04.08
- Posts:
- 8
Hi, I'd develop a visit count block using the pn_counter table, but I has the trouble than every time an user click's a module this value (total hits) change, although the time of session has not finished, I'd solved this trouble adding this code at modules\Stats\ pnuserapi.php -> stats_userapi_collect:
But I don't know if it is the best solution? any suggest?
-----
-. Karman .-
http://www.inexinferis.co.nr
PD: Excuse my English, I am learning... xD -
- rank:
-
pnProfessional
- registered:
- December 2003
- Status:
- offline
- last visit:
- 08.05.08
- Posts:
- 2635
Sessions, are not the solution. Security variables change sessions times limits. A session can remain open indefinitely, and a guest may not use a session at all.
-----
-- David Pahl -- (PostNuke Support Team)
<div id="me" class="none" style="none" />
-
- rank:
-
pnFreshman
- registered:
- April 2008
- Status:
- offline
- last visit:
- 04.04.08
- Posts:
- 8
Yes, I thought that, but what other way are?
-----
-. Karman .-
http://www.inexinferis.co.nr
PD: Excuse my English, I am learning... xD -
- rank:
-
pnProfessional
- registered:
- December 2003
- Status:
- offline
- last visit:
- 08.05.08
- Posts:
- 2635
Well, what exactly do you want to calculate?
What should trigger a +1 ? What do you want your formula to be?
Why not use a script that counts unique IPs per X hours...
-----
-- David Pahl -- (PostNuke Support Team)
<div id="me" class="none" style="none" />
-
- rank:
-
pnFreshman
- registered:
- April 2008
- Status:
- offline
- last visit:
- 04.04.08
- Posts:
- 8
There is not a calc. It's only add each visit to a variable (SQL)...
The question was, way pnStats increments the number of visits when a user visit a module (downloads for example), the number of visits should be incremented only the first time the user load the pag.
Is not for hour what I want, but the total number of visits... you can see how it's in the left side of my web... below is the address...
Regards
-----
-. Karman .-
http://www.inexinferis.co.nr
PD: Excuse my English, I am learning... xD -
- rank:
-
pnProfessional
- registered:
- December 2003
- Status:
- offline
- last visit:
- 08.05.08
- Posts:
- 2635
Yes, but what makes a visit a unique visit?
You really have to decide what make a visit unique. It is rather arbitrary, if you ask me. The only thing hit counter count is the number of times it adds 1.
Same with the stats, if the stats add 1 every time a module is refreshed, that gives an accurate account of how often the module is refreshed... nothing more. Throw in some Ajax, and you got some more worthless data. :P
If you want better data, use webalyiser or sew google into your site...
-----
-- David Pahl -- (PostNuke Support Team)
<div id="me" class="none" style="none" />
Start ::
Developers Corner ::
Block Development ::
stats count trouble
