Expand my Community achievements bar.

Join us January 15th for an AMA with Champion Achaia Walton, who will be talking about her article on Event-Based Reporting and Measuring Content Groups!
SOLVED

Best way to store timestamp HH:MM:SS into eVar

Avatar

Level 4

Best way to store timestamp HH:MM:SS into eVar by using plugin or App measurement. 

1 Accepted Solution

Avatar

Correct answer by
Community Advisor and Adobe Champion

I don't know if there is a "best practice" per se... this is a pretty niche requirement... 

Adobe Workspaces provide breakdowns to a minute granularity already... Data Warehouse exports only support down to hourly data.

 

For most companies, if they need down to the second reporting, then they generally set up Raw Data feeds (which contain the full and complete timestamp (day, hour, minute, second, millisecond) and process the data (as close as possible to Adobe) and use their own internal data lake).

 

 

That said, if you don't want to go that route, and instead set up custom tracking, how you store the data will really depend on how you plan to use it.

 

Key items to keep in mind:

  • How do you want it to display - visually appealing / readable to your users is important 
  • Are you going to use Classifications to process the data, and make segments from those classifications? If so, you want values that you can easily parse with Regex
  • Any data collected manually like this won't line up with Adobe's timestamp... especially the seconds.... there will always be minor variations (since system time variance is "acceptable" is a 5 min tolerance), and then you have people that don't use auto-sync time that could have anything set on their device.....  Adobe tracking uses the Adobe server to set the timestamp, so it's one consistent source of truth

View solution in original post

11 Replies

Avatar

Level 4

@VaniBhemarasetty - Thanks for the reply.

 

already we have capturing out of the box data like minutes, day, hour etc., which we can access in workspace.

 

let me rephrase my question.

Client want minutes or seconds dimension or granularity option in the data warehouse. unfortunately those are not available in the data warehouse.  so we want to collect the complete timestamp in eVar, so the client utilize dimension (eVar) in data warehouse.

 

Can you suggest me best practice.

Thanks!

 

Avatar

Community Advisor

I'm still unclear about what your requirements are. Is it:

A. The client wants "minutes" granularity from the timestamp. You track "14:23:56" to your existing eVar. So in your new eVar, you want to track "23"?

or

B. The client wants "minutes" granularity from the duration to complete a process. If a user takes 1 hour 13 minutes to complete that process, then in your new eVar, you want to track "73"?

or

C. Something else? (Please provide a concrete example.)

Avatar

Correct answer by
Community Advisor and Adobe Champion

I don't know if there is a "best practice" per se... this is a pretty niche requirement... 

Adobe Workspaces provide breakdowns to a minute granularity already... Data Warehouse exports only support down to hourly data.

 

For most companies, if they need down to the second reporting, then they generally set up Raw Data feeds (which contain the full and complete timestamp (day, hour, minute, second, millisecond) and process the data (as close as possible to Adobe) and use their own internal data lake).

 

 

That said, if you don't want to go that route, and instead set up custom tracking, how you store the data will really depend on how you plan to use it.

 

Key items to keep in mind:

  • How do you want it to display - visually appealing / readable to your users is important 
  • Are you going to use Classifications to process the data, and make segments from those classifications? If so, you want values that you can easily parse with Regex
  • Any data collected manually like this won't line up with Adobe's timestamp... especially the seconds.... there will always be minor variations (since system time variance is "acceptable" is a 5 min tolerance), and then you have people that don't use auto-sync time that could have anything set on their device.....  Adobe tracking uses the Adobe server to set the timestamp, so it's one consistent source of truth

Hi @VaniBhemarasetty ,
Just checked the above link you shared and also got the value via getTimeParting plugin in Web SDK implementation.
But I wanted to know if we can capture the timestamp value as - is (as shown in the ss below) in an eVar, is that possible ?

aguseranalytics_0-1717663399180.png

Meanwhile, I checked few documents it says "xdm.timestamp" is the path, but it is not retrieving any value, any thoughts if we need to add some other code here to pick the timestamp value.

Secondly, I also tried mapping the "xdm.timestamp" to an eVar in the DataStreams mapping itself,  but no luck!

Please share your thoughts on the above concern!!

Thanks

 

 

Avatar

Community Advisor and Adobe Champion

I store timestamp data like that in one of my eVars, but in Adobe Analytics its still stored as text. Which means I cannot process it as a timestamp.  It can be used as a timestamp when I use report builder, and use Excel to convert it into a usable timestamp, or by our Data Team who can convert it to a timestamp from the Raw Data Feeds and store it in our data lake as a timestamp.

 

Maybe you could help share your use case so we can offer some additional insights?

 

In my case, the timestamp is actually the publishing time of our articles, but I use a secondary way to store the year/month and day info (for segment creation so that I can pull back content publish with a specific span)

Avatar

Level 2

Thanks for above details @Jennifer_Dungan !

Basically the requirement is to capture the "timestamp" value in an eVar via the Web SDK implementation. 
Meaning how the web sdk interact call shows the timestamp value as below,

aguseranalytics_0-1717746425872.png

 

that same value should also get stored in an eVar as well. 

lets say eVar3= timestamp_value in the interact call as well.

 

So, for that I was checking is there any other code which we can use to retrieve that value, because "xdm.timestamp" as I mentioned earlier was not working for me.

 

Context is same, we have to see that value in Analysis Workspace reporting for now.

Avatar

Community Advisor and Adobe Champion

I haven't started using XDM Stream yet, but I don't see a specific mapping for the timestamp in this documentation: 

https://experienceleague.adobe.com/en/docs/analytics/implementation/aep-edge/xdm-var-mapping

 

However, have you tried using processing rules?

I wonder if you could map it using the:

a.x_.timestamp

(double check that this is the correct address)

 

This may not be the ideal solution, but it's something that might work, unless someone more familiar with XDM joins in.

Avatar

Community Advisor

It seems that, ultimately, you want to perform some calculations on timestamps, e.g. given 2 timestamp values then find the duration between them. And you expect to be able to achieve this in Analysis Workspace.

Firstly, it doesn't matter if you use the xdm:timestamp field. As long as you're sending data to Analytics' eVar3, then the value will always be stored as a text string. There is no way around it. So "2024-06-06T08:00:40.642Z" will get stored as the string "2024-06-06T08:00:40.642Z" (e.g. read "two zero two four dash zero six dash zero six T zero eight colon zero zero colon four zero dot six four two Z"), and not the date-time 6 June 2024 8:00:42am.

Your best bet is to export the report out of Analysis Workspace e.g. via Data Warehouse, then run your report in another tool, e.g. Excel can recognise that "2024-06-06T08:00:40.642Z" is a timestamp and will allow you to perform time-related calculations on it.

Avatar

Community Advisor and Adobe Champion

Right, What @yuhuisg no matter what data you send to your eVar it will always be stored as text... I think CJA you can store as numbers and timestamps, etc because it's a different architecture..

 

Going back a few messages, I noticed:

Client want minutes or seconds dimension or granularity option in the data warehouse. unfortunately those are not available in the data warehouse.

The new data warehouse does actually support hour and minute dimensions:

Jennifer_Dungan_0-1717860023799.png

 

Though, the formatting is a little weird to process.... 

 

 

However, if you are able to store the full timestamp, exporting that dimension you can convert and parse it as a timestamp outside of Adobe (which I think you are trying to achieve)... based on the most recent conversation, I think the challenge is picking up the XDM Timestamp and passing it into an eVar? 

 

But if you are using Raw Data Feeds, the timestamp is available there, with no need to set it into an eVar. But processing Raw Data Feeds has its own set of challenges.....

Avatar

Level 2

Thanks @yuhuisg and @Jennifer_Dungan for sharing your insights.
Yes correct the idea was to store the timestamp in an eVar as per the current requirement and I am going to try that with processing rules too, I was just trying this step from data- stream configurations if that works or no!!

 

And yes to that point, to do the further calculations with time or to check the difference between the timestamp then we need to export data out of analysis workspace and do the calculations, will surely consider this point.
Thanks both!!