Expand my Community achievements bar.

Join us for the next Community Q&A Coffee Break on Tuesday April 23, 2024 with Eric Matisoff, Principal Evangelist, Analytics & Data Science, who will join us to discuss all the big news and announcements from Summit 2024!
SOLVED

Calculate total seconds spent using data feeds

Avatar

Level 1

How can I calculate Total Seconds Spent using Data Feeds?

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Total seconds spent metric is available only in Analysis Workspace, Reports & Analytics, Report Builder (called ‘total time spent’), Data Warehouse, Ad Hoc Analysis.

 

In data feed you can do following to get 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. Subtract the last hit post_cust_hit_time value in a visit from the visit_start_time_gmt value calculated in first step.
  4. This number is the amount of total time spent (in seconds) for the visit.

View solution in original post

1 Reply

Avatar

Correct answer by
Community Advisor

Total seconds spent metric is available only in Analysis Workspace, Reports & Analytics, Report Builder (called ‘total time spent’), Data Warehouse, Ad Hoc Analysis.

 

In data feed you can do following to get 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. Subtract the last hit post_cust_hit_time value in a visit from the visit_start_time_gmt value calculated in first step.
  4. This number is the amount of total time spent (in seconds) for the visit.