Expand my Community achievements bar.

Webinar: Adobe Customer Journey Analytics Product Innovations: A Quarterly Overview. Come learn for the Adobe Analytics Product team who will be covering AJO reporting, Graph-based Stitching, guided analysis for CJA, and more!

getTimeToComplete with multiple timers

Avatar

Level 1

I am trying to get the time between 2 events that can be set with multiple id values set in an eVar. 

 

E.g. I have a tool started event that has a tool.toolId (eVar1) value of "Calculator"  with a tool completed event with the same tool.toolId (eVar1) value of "Calculator". But there may be other tool started and complete events that happen between the Calculator tool started and tool completed. 

 

I am trying to figure out if I can use the getTimeToComplete plugin to start a timer for each tool started based on the tool.toolID (eVar1).  

 

Thanks

3 Replies

Avatar

Community Advisor

The most direct approach is passing the value of eVar1 as the second parameter for the getTimeToComplete function which is for the cookie name, so you have different timers by different cookie names aligned with your tool name/id. You may want to have some kind of pattern/prefix on the cookie name from your tool id, such as s_Calculator to avoid any cookie conflict.

Avatar

Level 1

Thanks! I'm giving this a try. But I'm having an issue installing the getTimeToComplete plug-in using the Adobe Analytics extension. I'm getting errors preventing my build from succeeding (Unexpected '\', Unmatched '{' and Expecting UnicodeEscapeSequence -- uXXXX or u{XXXX} ). Is there something that i need to do to modify the code from the documentation here: https://experienceleague.adobe.com/en/docs/analytics/implementation/vars/plugins/gettimetocomplete 

 

Thanks for your help!

Avatar

Community Advisor

 Are you using one of the following Launch extensions to set up the plugin? Don't copy and paste those JavaScript from https://experienceleague.adobe.com/en/docs/analytics/implementation/vars/plugins/gettimetocomplete, use the extension and let Adobe help to manage the version update of plugins.

Screenshot 2024-05-22 at 2.03.36 PM.png