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

Hit based segment - data feeds

Avatar

Level 1

Hi community,

 

I have started working with data feeds and I am not re-creating segments that we use for reporting, whilst I do not have any issues with visit and visitor level segments, I am somewhat struggling with hit based ones.

 

Below is an example where we exclude some hits based on the following criterias:

bclement_2-1582534916544.png

 

bclement_1-1582534845998.png

 

Any idea on how to get time spent per visit - granular and content time spent in data feeds?

 

Many thanks,

Bastien

 

 

 

1 Accepted Solution

Avatar

Correct answer by
Level 5

Hypothesizing that 'content time spent' is a custom measure within your organization - but looking at the data feed metrics docs it walks through what is required for time calculations.

https://docs.adobe.com/content/help/en/analytics/export/analytics-data-feed/data-feed-contents/dataf...

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 eventss

 

What are you using to query the clickstream data? If you group by the concatenation in step 1 and subtract min(hit_time_gmt) from max(hit_time_gmt) you would likely get the visit duration.

View solution in original post

1 Reply

Avatar

Correct answer by
Level 5

Hypothesizing that 'content time spent' is a custom measure within your organization - but looking at the data feed metrics docs it walks through what is required for time calculations.

https://docs.adobe.com/content/help/en/analytics/export/analytics-data-feed/data-feed-contents/dataf...

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 eventss

 

What are you using to query the clickstream data? If you group by the concatenation in step 1 and subtract min(hit_time_gmt) from max(hit_time_gmt) you would likely get the visit duration.