Expand my Community achievements bar.

SOLVED

Mobile App Timed Event Tracking

Avatar

Level 2

Hi,

I'm implementing Adobe Anlytics for a mobile app. one of the requirement is to capture the time to completion of a form in the app.

It appears it was possible to track timed actions in legacy mobile services SDK - https://github.com/Adobe-Marketing-Cloud/mobile-services/blob/master/docs/android/analytics-main/tim...

 

But, I'm uable to find any documents on how to do it using the AEP SDK (mobile core). is it possible? any suggestions would be of great help.

 

Thanks.

1 Accepted Solution

Avatar

Correct answer by
Community Advisor and Adobe Champion

I am unaware of an "out of the box" solution, but in theory you could have your developers start a timer in the code when the user starts the form, until the completion... on completion they can send the value in seconds (I will explain why more shortly) as a context variable.

 

Now, in your processing rules, you can set this value into an eVar (which will store the value as text), or pass it into a numeric event:

 

Jennifer_Dungan_0-1691118198100.png

(Note: you might want to add a condition here, "If timer(Context Data) is set")

 

 

Now, returning to why I said pass the value in seconds...

 

You can create a calculated metric, pulling in just your event, like so:

Jennifer_Dungan_1-1691118368540.png

 

And make sure you set the format to Time:

Jennifer_Dungan_2-1691118429883.png

 

And then you will be able to see the values like this:

Jennifer_Dungan_3-1691118481172.png

 

View solution in original post

5 Replies

Avatar

Correct answer by
Community Advisor and Adobe Champion

I am unaware of an "out of the box" solution, but in theory you could have your developers start a timer in the code when the user starts the form, until the completion... on completion they can send the value in seconds (I will explain why more shortly) as a context variable.

 

Now, in your processing rules, you can set this value into an eVar (which will store the value as text), or pass it into a numeric event:

 

Jennifer_Dungan_0-1691118198100.png

(Note: you might want to add a condition here, "If timer(Context Data) is set")

 

 

Now, returning to why I said pass the value in seconds...

 

You can create a calculated metric, pulling in just your event, like so:

Jennifer_Dungan_1-1691118368540.png

 

And make sure you set the format to Time:

Jennifer_Dungan_2-1691118429883.png

 

And then you will be able to see the values like this:

Jennifer_Dungan_3-1691118481172.png

 

Avatar

Level 2

Hey Jennifer,

Thank you for your response. I did try your suggestion.

The issue is that when setting the "duration" as a numeric event for the contextdata varible that is a string doesnt seem to output the required value/data.

 

Event Config

Winston_2022_0-1691121970309.png

Raw Event Metric Value

Winston_2022_2-1691122096541.png

So when converting the Raw Event to friendly Time format, it's not going to quite work as expected.

Winston_2022_3-1691122511750.png

it also appears, that contextdata variable values can not be anything other than a string.

 

So I'm currently exploring other options.

 

Thanks.

 

 

 

 

Avatar

Community Advisor and Adobe Champion

Or it's being treated like a "total" value for all users?

 

I've not actually tried this, this is all "in theory"....

 

 

You could also try having your developers set it to the event directly??

cdata.put("&&events", "event1=157");

 

Avatar

Level 2

I think I've managed to solve it.

I followed the previosuly mentioned steps. But in the calculated metric, I use a formula to convert the value further with format as time. Seem to be working, pending further testing looks like it will solve for my requirement.

Winston_2022_0-1691162702018.png

Thanks.

 

Avatar

Community Advisor and Adobe Champion

Sounds like your developers are sending the value as milliseconds not seconds... 

 

That would explain needing the divide by 1000

 

 

Glad you got it sorted out