Expand my Community achievements bar.

Join us at Adobe Summit 2024 for the Coffee Break Q&A Live series, a unique opportunity to network with and learn from expert users, the Adobe product team, and Adobe partners in a small group, 30 minute AMA conversations.

How to recreate trackTimedActionStart functionality?

Avatar

Level 1

Hi All,

From the below documentation:

https://developer.adobe.com/client-sdks/documentation/upgrade-platform-sdks/analytics-comparison/

I can see that trackTimedActionStart, trackTimedActionUpdate, trackTimedActionEnd & trackTimedActionExists functionality can be recreated using the Analytics and User Profile extensions.

raman_kumar3_0-1670258332261.png

But I can't figure out how this can be done using Analytics & Profile extension, Any help would be greatly appriciated!

Thank You!

6 Replies

Avatar

Community Advisor

I don't use those plugins myself, but I was just looking.. and while it's not immediately obvious, the "iOS" and "Android" links here:

Jennifer_Dungan_0-1670274802672.png

Are actually clickable and go to a Git Repository showing how to set up the code in your SDK:

https://github.com/Adobe-Marketing-Cloud/mobile-services/blob/master/docs/ios/analytics-main/timed-a...

Looks like you probably need the extensions, but your developers have to do some of the work too (it's not fully done via the extension itself).

Avatar

Level 1

Thanks Jennifer, I tried to clicking on these links but it seems that there are no examples given and code we were using earlier doesn't work now:

var *cData = @{
}
ADB.trackTimedActionEnd('timer:logged in-submission', cData);

Are you aware of any examples or alternatives to achieve this?

Avatar

Community Advisor

Not sure if you removed code from your sample, but right now it looks like your Context Data "cData" has no value?

 

Is this code you have been using for a while that broke with an update, or you are trying to add this to your mobile app for the first time (to match your web implementation)?

Avatar

Community Advisor

Usually, I just simply ask the developer to manage the timer and calculate the lapse time then send the calculated lapse time in AA tracking.

Interesting to see the suggestion using the Profile extension and Adobe didn't provide any example on how 

Just my best guess is using the "updateUserAttribute" function to set the timer name as first parameter and the start time as second parameter for the timed action start. Then when timed action end, use the "retrieveUserAttribute" function with the timer name and calculate the lapse time.

Avatar

Level 1

Thanks Leocwlau!
Just wanted to know if there is any documentation around 'retrieveUserAttribute'?

Also is it possible to share a working example?

Avatar

Community Advisor

Here is the link to documentation, https://developer.adobe.com/client-sdks/documentation/profile/api-reference/

For a working example, I need to work it out and it takes sometime.