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

Chat Tracking

Avatar

Level 3

Chat related data capturing in adobe datalayer like started, cancelled, time etc..,

 

We are capturing the "chat timestamp in eVar, event2 for started and event3 for cancelled.

1) how can i check that how much time as spent by user on single chat?

 

2) If i missing something, please guide in proper way to colleting the data and making reports?

 

Thank you very much!

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

You could try Adobe's getTimeBetweenEvents plugin:

https://experienceleague.adobe.com/docs/analytics/implementation/vars/plugins/gettimebetweenevents.h...

 

Or potentially the getTimeToComplete:

https://experienceleague.adobe.com/docs/analytics/implementation/vars/plugins/gettimetocomplete.html...

 

getTimeBetweenEvents relies on have custom events, which you have... so that shouldn't be a problem. The alternate getTimeToComplete gives you a more manual start/stop control...

 

I would start with getTimeBetweenEvents and see if that works for you.

View solution in original post

3 Replies

Avatar

Correct answer by
Community Advisor

You could try Adobe's getTimeBetweenEvents plugin:

https://experienceleague.adobe.com/docs/analytics/implementation/vars/plugins/gettimebetweenevents.h...

 

Or potentially the getTimeToComplete:

https://experienceleague.adobe.com/docs/analytics/implementation/vars/plugins/gettimetocomplete.html...

 

getTimeBetweenEvents relies on have custom events, which you have... so that shouldn't be a problem. The alternate getTimeToComplete gives you a more manual start/stop control...

 

I would start with getTimeBetweenEvents and see if that works for you.

Avatar

Level 3

Hi @Jennifer_Dungan , Thanks for reply

 

Present implemented like

example- 
Time stamp (v46)       Started(e15)        Cancelled(e16)
1002                          1                          0
12000                        0                          1

 

your suggesting to getTimeBetweenEvents extension.

 

As per my understaning, need to store timestamp in events and time spent on chat will store in eVar46. 

Started(e15) 

Cancelled(e16) 

 

eVar46 = Started(e15) - Cancelled(e16)

 

I am in right direction? if not can you please explain little bit more about it.

 

Thanks!

 

 

 

Avatar

Community Advisor

Hi, you shouldn't need to store timestamps in your events.... when the events are triggered there is already a system level timestamp associated to them...

 

This plugin should automatically do the math for you between event15 and event16... 

 

 

There are several examples in the documentation that show some of the options, including if the timer should reset if your first event is triggered again (without getting to the second event, and other potential events that can trigger a reset, or customizing the cookie to use to maintain the timer between sessions, etc).

 

Since your implementation is fairly simple... start and end help chat, you should only need the simplest version of the code:

 

s.eVar46 = getTimeBetweenEvents("event15", true, "event16", true);

 

I've not actually used his plugin myself... I am just going by the documentation...  the fact that the format of the data could potentially change if not specified (as per above), you could make it a bit more absolute:

 

s.eVar46 = getTimeBetweenEvents("event15", true, "event16", true, "s_tbe", 0, "s");

 

This should force it to always be counted in seconds, and reset at the end of the session.