내 커뮤니티 업적 표시줄을 확대합니다.

Submissions are now open for the 2026 Adobe Experience Maker Awards

getTimeToComplete Plugin is not working

Avatar

Community Advisor

Hi Team,

 

I have defined 'getTimeToComplete' plugin in Adobe Analytics extension like this :

// Start the timer when the visitor initiates Merchant Process
if (s.events.indexOf("event139") > -1) getTimeToComplete("start");
// Stop the timer when the visitor makes a change and set eVar125 to the time difference between stop and start
if (s.events.indexOf("event112") > -1) s.eVar125 = getTimeToComplete("stop");

I have initialized the plugin also like this :

ambikaTewari_ATCI_0-1710266897244.png

 

 

But I'm getting this console error :

ambikaTewari_ATCI_1-1710267004551.png

 

ambikaTewari_ATCI_2-1710267028383.png

 

 

is there anything I'm doing it wrong?

Any help on this would be really appreciated.

 

Thank you.

 

주제

토픽은 커뮤니티 콘텐츠를 분류하여 관련성 있는 콘텐츠를 찾는 데 도움이 됩니다.

4 답변 개

Avatar

Level 4

Please confirm if you have properly installed the plug-in using AppMeasurement.js after the Analytics tracking object is instantiated

Avatar

Community Advisor

yes I have installed it now as mentioned in help doc https://experienceleague.adobe.com/en/docs/analytics/implementation/vars/plugins/gettimetocomplete and now it is workign corectly

Avatar

Level 3

Hi @ambikaTewari_ATCI , it seems like s.events is undefined. Can you check if s.events exists before calling indexOf function?

Avatar

Community Advisor

Hi @AbhilashSh @ezhil_raja 
I have used this condition also in extension :

ambikaTewari_ATCI_0-1714561909796.png

 

 

But still I'm getting this error in console :

ambikaTewari_ATCI_2-1714561999361.png

 

ambikaTewari_ATCI_1-1714561979297.png