Expand my Community achievements bar.

SOLVED

Calculating bounces and time spent per visit/visitor from Data Feeds

Avatar

Former Community Member

I've combed many forum posts, websites, and the documentation page, but I am still unable to match exact figures for these two metrics.

 

Anyone managed to correctly derive the recipe to calculate bounces and time spent per visit/visitor?

1 Accepted Solution

Avatar

Correct answer by
Level 5

Bounces would be the sum of visits for which 'visit_page_num' does not ever equal 2.

For time spent per visit/visitor, did you try following the steps below, but only subtracting the first hit from the last hit within the visit? Then summing to get a per visitor aggregate on site level.

Time spent

Hits must first be grouped by visit, then ordered according to the hit number within the visit.
  1. Concatenate post_visid_high , post_visid_low , visit_num , and visit_start_time_gmt .
  2. Sort by this concatenated value, then apply a secondary sort by visit_page_num .
  3. If a hit is not the last one in a visit, subtract the post_cust_hit_time value from the subsequent hit's post_cust_hit_time value.
  4. This number is the amount of time spent (in seconds) for the hit. Filters can be applied to focus on dimension values or events.


How far off are your values from data feeds from what you see within the interface?

View solution in original post

2 Replies

Avatar

Correct answer by
Level 5

Bounces would be the sum of visits for which 'visit_page_num' does not ever equal 2.

For time spent per visit/visitor, did you try following the steps below, but only subtracting the first hit from the last hit within the visit? Then summing to get a per visitor aggregate on site level.

Time spent

Hits must first be grouped by visit, then ordered according to the hit number within the visit.
  1. Concatenate post_visid_high , post_visid_low , visit_num , and visit_start_time_gmt .
  2. Sort by this concatenated value, then apply a secondary sort by visit_page_num .
  3. If a hit is not the last one in a visit, subtract the post_cust_hit_time value from the subsequent hit's post_cust_hit_time value.
  4. This number is the amount of time spent (in seconds) for the hit. Filters can be applied to focus on dimension values or events.


How far off are your values from data feeds from what you see within the interface?