Avg. Time per Visit: collector vs dvce timestamp?

Hi all,

I’ve been trying to run the “Average visit duration” query from the basic recipes but the data seemed to be quite off… We also had certain days that the average was double or 3 times what it is normally (e.g. whole week we have an avg of ~250 seconds and one day this shoots to ~450 for no reason). When I did some investigation I saw that the collector_tstamp isn’t always correct. See below.

This doesn’t happen very often on a day but often enough to skew the data. I tried to use the dvce_timestamp but that can have totally inaccurate times (and it does). We do have page_pings active on our website.

My question: whats the best way of filtering out this problem and getting the most accurate “avg time”?

One of the cool things about Snowplow is that any events that don’t make it to the collector properly is that the JS tracker will store it for sending later on. The downside is that it often gives us data like this.

Best to have a read of this awesome post by Alex here:

I haven’t used derived_tstamp yet, but that could be what you’re after. Like us, you’ll need to upgrade to JS Tracker 2.6.x to send dvce_sent_tstamp with each event.

Hi @Koen87,

I’d also recommend reading Alex’s blogpost – let us know if you have any follow-up questions.

To add to what @robkingston wrote: the collector_tstamp is still the timestamp most Snowplow users use, but it’s good to be aware of it’s limitations. We are in the process of making the derived_tstamp the primary timestamp: https://github.com/snowplow/snowplow/issues/2457


Thanks @christophe and @robkingston. I’ll update the JS asap and wait for the other stuff to be done.