getTimeToComplete with multiple timers | Community
Skip to main content
May 20, 2024
Question

getTimeToComplete with multiple timers

  • May 20, 2024
  • 1 reply
  • 818 views

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

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

1 reply

leocwlau
Community Advisor and Adobe Champion
Community Advisor and Adobe Champion
May 21, 2024

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.

May 21, 2024

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!

leocwlau
Community Advisor and Adobe Champion
Community Advisor and Adobe Champion
May 22, 2024

 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.