Hello,
I am currently subscribing to data from a data feed, loading it into a database via SFTP for analysis. I would like to ask about the calculation rules for the 'total spent time' metric. Which fields are used and what logic is applied to calculate it? I need to ensure that it aligns with the values in the workspace.
Topics help categorize Community content and increase your ability to discover relevant content.
Views
Replies
Total Likes
My current calculation rules are:
page_name post_cus_hit_time
page A 11:00
page B 11:01
page C 11:03
page A total spent time is 11:01- 11:00 = 1 minutes
page B total spent time is 11:03-11:01= 2 minutes
However, this result is different from the one in the workspace.
Views
Replies
Total Likes
Hi @leozh1, so the field you have in your screenshot is counting in seconds, not in minutes. Which means first you need to convert your measure to seconds. This time is counted against specific dimensions. In your example, you have pages. It will use the timestamps to calculate how long people spent on the page. The exception is if it's the last page of the visit, because there is no "end" time stamp, it won't be included. So, for example
Visit 1
Page A 11:00:00
Page B 11:00:30
Visit 2
Page C 12:00:00
Page A 12:01:00
Page B 12:01:45
Visit 3
Page C 1:00:00
Page A 1:00:10
If we want to get the total time for each page,
Page A gets 30 seconds from the first visit and 45 seconds from the second. It doesn't count any time from the third visit because it's the last page, so there is no end time stamp for it to compute with. It would end up with 75 seconds
Page B wouldn't get any time calculated since it's the last page seen in each visit, so it would have 0.
Page C would get counted in both visits it's seen in, 1 minute from visit 2 and 10 seconds from visit 3, so a total of 70 seconds.
This page here explains how the different time metrics are calculated. How Time Spent is calculated in Adobe Analytics | Adobe Analytics
Hope this helps.
Hello,
I am currently using the formula you mentioned to calculate, but the results are inconsistent with those in the workspace.
Views
Replies
Total Likes
Hello, I found that eVars and props are also included in the total spent time. Currently, my calculation rules only use post_visid_high, post_visid_low, post_pagename, visit_num, visit_page_num, and cust_hit_time_gmt to calculate spent_time. How should I calculate the corresponding spent_time for eVars and props?
Views
Replies
Total Likes
Persisted variables, such as eVars, count towards total seconds spent. Traffic variables, such as props, include seconds spent across subsequent link tracking calls.
Hello, I found that eVars and props are also included in the total spent time. Currently, my calculation rules only use post_visid_high, post_visid_low, post_pagename, visit_num, visit_page_num, and cust_hit_time_gmt to calculate spent_time. How should I calculate the corresponding spent_time for eVars and props?
Views
Replies
Total Likes
Hello,
Persisted variables, such as eVars, count towards total seconds spent. Traffic variables, such as props, include seconds spent across subsequent link tracking calls.
https://experienceleague.adobe.com/en/docs/analytics/components/metrics/total-seconds-spent
My current calculation rules are:
page_name post_cus_hit_time
page A 11:00:10
page B 11:00:20
page C 11:00:25
page A total spent time is 11:00:20- 11:00:10 = 10s
page B total spent time is 11:00:25-11:00:20= 5s
However, this result is different from the one in the workspace.
I found that eVars and props are also included in the total spent time. Currently, my calculation rules only use post_visid_high, post_visid_low, post_pagename, visit_num, visit_page_num, and cust_hit_time_gmt to calculate spent_time. How should I calculate the corresponding spent_time for eVars and props?
Views
Replies
Total Likes
@leozh1 I've merged this new question with your previous one since they're the same.
@leozh1 wrote:I found that eVars and props are also included in the total spent time. Currently, my calculation rules only use post_visid_high, post_visid_low, post_pagename, visit_num, visit_page_num, and cust_hit_time_gmt to calculate spent_time. How should I calculate the corresponding spent_time for eVars and props?
If I understand what you're trying to do correctly, you want to calculate the time between instances of an evar firing and not necessarily the page. You could replace the page dimension with the evar # that you're interested in. Using the evar column, not the post_evar column, will show you the hits where the value fired. You then just do the same calculation that you would with page name, using the time stamp between the two.
Note, if you try to use the post_evar column, this will include any hits where the value persisted and not just those where it actually fired.
Views
Replies
Total Likes