How to convert a time dimension into metric | Community
Skip to main content
Level 2
July 21, 2023
Solved

How to convert a time dimension into metric

  • July 21, 2023
  • 2 replies
  • 1435 views

Hi, 

The data on my adobe analytics platform is capturing the time spent on specific flows (hard coded before) as a dimension. So it shows that how many times xyz flow took 19 secs, 20 secs, 2300 secs and so on. I want to create this into a metric so that I can calculate average, median, mode etc for those specific flows. Any recommendations on how to do this the best way possible? 

 

Thank you. 

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by yuhuisg

That is correct. Dimension values are always stored as strings. So even though you and I see "19 sec" and recognise it as 19 seconds, to AA, that is the string "19 sec" (like "one nine space s e c") and has no other knowledge of it aside from being a string of alphabets and numbers and punctuation.

If you need to report on time as a metric, you should change your implementation to track your time durations to a success event in seconds. Then, in Analysis Workspace, though that metric gets reported as an integer, you can create a Calculated Metric from it and format it as "Time" to get a more familiar hh:mm:ss format.

2 replies

Jennifer_Dungan
Community Advisor and Adobe Champion
Community Advisor and Adobe Champion
July 21, 2023

So you are capturing time spent flows into a custom dimension like a prop or eVar, correct?

 

I don't believe you can convert this to a metric... you would have to take the data external to Adobe (such as Data Warehouse Export, Report Builder, API, or Raw Data Feeds) and process convert the text to a numeric value for your calculations.

yuhuisg
Community Advisor
yuhuisgCommunity AdvisorAccepted solution
Community Advisor
July 22, 2023

That is correct. Dimension values are always stored as strings. So even though you and I see "19 sec" and recognise it as 19 seconds, to AA, that is the string "19 sec" (like "one nine space s e c") and has no other knowledge of it aside from being a string of alphabets and numbers and punctuation.

If you need to report on time as a metric, you should change your implementation to track your time durations to a success event in seconds. Then, in Analysis Workspace, though that metric gets reported as an integer, you can create a Calculated Metric from it and format it as "Time" to get a more familiar hh:mm:ss format.

V_Pavan
Level 2
July 24, 2023

Hey,
Are you calculating the time spent using plugin or a custom code?