Re-Track each (for example) 30 seconds

Hey there,
my opinion: Piwik has an little “mistake”.

Its a really big and a really nice software, but there is one point I would like to discuss right now :slight_smile:

Piwik records the actions and show an “visit time”, this is calculated by “last action timestamp” - “first action timestamp”.
But there is a problem: the user doesn’t execute the last action and leaves the page just in this second, he takes (i hope so) a while on the page he visited through the last action :slight_smile:

So can you may be able to give an optional setting for an “recording interval” that I can set “record the user all 15 or 30 seconds” and the user would be recorded through an intervall. Is this possible?

Answers would be really nice :slight_smile: Happy new year everybody ^^

Possible/doable.

Thanks for the reply :slight_smile:

Right now or in the future?

In the future. I’m going to sleep…so, definitely not right now. :wink:

I’d like to implement it in 1.2 (along with first party cookies). Stay tuned.

Seconding this request. For now I have switched back to GA for some smaller sites to see user time on the main page. Would prefer to be able to see this in Piwik too.

IIRC, GA fakes it. If you don’t want to see 0, you can change the default setting in config/config.ini.php:


[General]
; treat bounce as a minimum 30 second visit
default_time_one_page_visit = 30

Note: the client-side changes have already been implemented for re-track (ping/heartbeat).

Interesting about GA, how is it going about faking it? I seem to get unique times for each visitor.

It’s not the display so much that bothers me would just rather have as close to actual time as possible. Someone might stay on a page for 2 minutes and then leave and this is what I would like tracked.

“Note: the client-side changes have already been implemented for re-track (ping/heartbeat).” – Great.

GA being a closed system, I obviously can’t say how GA calculates its numbers. But last I checked, it had no re-track facility.

[quote=vipsoft]
IIRC, GA fakes it. If you don’t want to see 0, you can change the default setting in config/config.ini.php:


[General]
; treat bounce as a minimum 30 second visit
default_time_one_page_visit = 30

Note: the client-side changes have already been implemented for re-track (ping/heartbeat).[/quote]

This setting has to go under [Tracker] not [General] .

I too am interested in not showing 0 seconds for one page visit and did the change but was wondering why it was not catching my settings of 10 seconds (which comes a bit closer to one page visit :slight_smile: ). So I looked up global.ini.php. And there it is under [Tracker]. Will know more tomorrow.

Hi vipsoft,

even after correct placing the entry under [Tracker] in config.ini.php it is NOT picked up.
Today I changed the setting in global.ini.php and IT IS picked up. At least in my case.

Why, no idea. Just wanted to let you guys know.

So Piwik 1.2 is out and there is no implementation of my assumed enhancemend right!?

Targeted for 1.3. We didn’t implement the server-side changes in time for 1.2.

I built something that does this a while ago because I have a site that primarily has one page on it, and I wanted to see how long they spent there. It turns out to be useful on sites that have many pages as well.

Here is what I did:

I created a directory piwik/refresh
piwik/refresh contains two files piwik/refresh/refresh.js and piwik/refresh/refresh.php

You can get those files here http://port443.net/refresh.zip

I then added javascript to the piwik tracking code on my pages:

Below

[size=small]document.write(unescape("%3Cscript src=’" + pkBaseURL + “piwik.js’ type=‘text/javascript’%3E%3C/script%3E” ));[/size]

I add

[size=small]document.write(unescape("%3Cscript src=’" + pkBaseURL + “refresh/refresh.js’ type=‘text/javascript’%3E%3C/script%3E” ));[/size]

The js file writes an img tag, and has a function that changes the src of that img every 45 seconds to the php file.

The php file reads the piwik cookie and updates the last action time and total visit time for the visit, and outputs a pixel gif.

Please keep in mind that the refresh.php file will not work for you as-is. It does not use piwik’s database connection, I use a different class for db access. If someone wants to modify it to work with piwik’s configuration and db access, please do.

-Kevin

[quote=turbo]
Hi vipsoft,

even after correct placing the entry under [Tracker] in config.ini.php it is NOT picked up.
Today I changed the setting in global.ini.php and IT IS picked up. At least in my case.

Why, no idea. Just wanted to let you guys know.[/quote]

For Piwik 1.2 the above settings in config.php are picked up correctly.

Hey guys, its Piwik 1.4, can you give me an update. Whats up to this topic, implemented or not? How can I use this feature?

For updates on the subject you should consult Support Ping requests to report a better 'time on page' · Issue #2041 · matomo-org/matomo · GitHub

Hello!

Has anyone used this? I tried but it doesn’t seem to write anything to the database? I did setup the DB name, table name, user, pass inside the refresh.php script. Absolutely no idea why it doesn’t work and I’m not that skilled to even think of stuff to test to see where the problem might be. Any ideas?

Thanks!

[quote=TucsonKEG]
I built something that does this a while ago because I have a site that primarily has one page on it, and I wanted to see how long they spent there. It turns out to be useful on sites that have many pages as well.

Here is what I did:

I created a directory piwik/refresh
piwik/refresh contains two files piwik/refresh/refresh.js and piwik/refresh/refresh.php

You can get those files here http://port443.net/refresh.zip

I then added javascript to the piwik tracking code on my pages:

Below

[size=small]document.write(unescape("%3Cscript src=’" + pkBaseURL + “piwik.js’ type=‘text/javascript’%3E%3C/script%3E” ));[/size]

I add

[size=small]document.write(unescape("%3Cscript src=’" + pkBaseURL + “refresh/refresh.js’ type=‘text/javascript’%3E%3C/script%3E” ));[/size]

The js file writes an img tag, and has a function that changes the src of that img every 45 seconds to the php file.

The php file reads the piwik cookie and updates the last action time and total visit time for the visit, and outputs a pixel gif.

Please keep in mind that the refresh.php file will not work for you as-is. It does not use piwik’s database connection, I use a different class for db access. If someone wants to modify it to work with piwik’s configuration and db access, please do.

-Kevin[/quote]

[quote=medyum]
Targeted for 1.3. We didn’t implement the server-side changes in time for 1.2. medyum[/quote]

Thank you very much! Where could one see the expected release date for 1.3?

BTW: Just noticed the current version is 1.5.1 as of today?

Thanks

Just wanted to bump this in the feature suggestions forum.

It’s scheduled for 1.10 right now!