How can I retrieve time spent on a bounced visit?
With Piano Analytics, you can retrieve time spent for a bounced visit thanks to data processing and the event-based model.
What is a bounce visit?
A bounce visit is a visit with fewer than two page loads, meaning 0 or 1 page.display event recorded during the visit.
This is true regardless of how many other events are collected (for example, click.action, page.scroll, etc.). A visit with one page.display and several click events is still a bounce visit because it only contains one page view.
How is time spent calculated?
Time spent is calculated from the time difference between events. Piano Analytics computes duration by summing the time gaps between consecutive events within a visit. As a result:
A visit needs at least two events to produce a measurable duration.
The duration calculation stops at the last recorded event of the visit (there is no way to measure time after the final event because nothing else is tracked).
Only onsite events are included in time-spent calculations; offsite events may not contribute to time spent (for example, some campaign offsite click events).
Getting time spent on a bounce visit
Even though the visit is still a bounce (because it has fewer than two page.display events), you can still obtain a time spent value if the visit contains at least two events.
Example:
page.display(page load)click.action(interaction on the same page)
In this case, the difference between the two event timestamps allows Piano Analytics to calculate the time spent for this bounce visit.
Another common approach is to collect a secondary onsite event such as page.scroll (for example, triggered after the user scrolls), which also provides a second timestamp and therefore enables duration measurement.
Important notes about time-spent metrics and bounces
Depending on the metric you use in reporting:
Visits with only one event have no duration (there is no second timestamp), so time spent cannot be computed.
Some “total time spent” style metrics exclude bounce visits or exclude visits without duration by design. This can lead to situations where a visit is a bounce and still shows a measurable duration in some contexts, while other aggregated time-spent metrics may not include it.
If you see 0 time spent unexpectedly, common causes include:
The visit only contains one event (no measurable duration).
The additional event is offsite and doesn’t contribute to onsite time spent.