getTimeToComplete and getTimeBetweenEvents Plug-ins | Community
Skip to main content
AliMaleki
Level 4
April 29, 2021
Solved

getTimeToComplete and getTimeBetweenEvents Plug-ins

  • April 29, 2021
  • 2 replies
  • 3628 views

I went through the steps outlined on this page to implement the getTimeToComplete plug-in:

Adobe plug-in: getTimeToComplete

 

1) Added the "Common Analytics Plugins extension" in Launch

 

2) Added an action to my "Initialize Plug-ins" rule with the following configuration:
Extension: Common Analytics Plugins
Action Type: Initialize getTimeToComplete

 

3) Added this code to an existing rule: s.getTimeToComplete("start");

 

4) Added this code to another existing rule: s.eVar1 = s.getTimeToComplete("stop");

 

I get this error:

Uncaught (in promise) TypeError: t.getTimeToComplete is not a function

 

I tried using getTimeBetweenEvents instead but I get this error:

Uncaught (in promise) ReferenceError: getTimeBetweenEvents is not defined

 

Any ideas on what's going on? Anyone used these successfully?

 

Ali

 

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

2) Which event does your "Initialize Plug-ins" rule trigger on? I use "Library Loaded".

3) and 4) Did you include s.getTimeToComplete("start"); and s.eVar1 = s.getTimeToComplete("stop"); in the custom code of an Adobe Analytics "Set Variables" action? They won't work in a Core custom code action.

2 replies

yuhuisg
Community Advisor
yuhuisgCommunity AdvisorAccepted solution
Community Advisor
April 29, 2021

2) Which event does your "Initialize Plug-ins" rule trigger on? I use "Library Loaded".

3) and 4) Did you include s.getTimeToComplete("start"); and s.eVar1 = s.getTimeToComplete("stop"); in the custom code of an Adobe Analytics "Set Variables" action? They won't work in a Core custom code action.

AliMaleki
AliMalekiAuthor
Level 4
April 30, 2021
I tried both of those and it still doesn't work. I don't understand why it shows "t.getTimeToComplete" in the error instead of "s.getTimeToComplete"?
jantzen_b
Adobe Employee
Adobe Employee
May 24, 2021
Do any of the answers below answer your initial question? If so, can you select one of them as the correct answer? If none of the answers already provided answer your question, can you provide additional information to better help the community solve your question?
Level 2
November 20, 2022

Hi, I am having issue with the same plugin, I want to expire it for 30 days , even though I gave expiration it's still getting cleared after session , do we have any work around here 

 

getTimeToComplete("start","test","30");