getTimeToComplete and getTimeBetweenEvents Plug-ins | Community
Skip to main content
AliMaleki
Level 4
Apr 29, 2021 2:02 PM UTC
Solved

getTimeToComplete and getTimeBetweenEvents Plug-ins

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.
yuhuisg
yuhuisgAccepted solution
New Participant
Apr 29, 2021 2:13 PM UTC

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.

11 replies

jantzen_b
Employee
May 24, 2021 6:39 PM UTC
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?
Translate
Level 2
Nov 20, 2022 3:41 AM UTC

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");

Translate
yuhuisg
yuhuisgAccepted solution
New Participant
Apr 29, 2021 2:13 PM UTC

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.

Translate
AliMaleki
AliMalekiAuthor
Level 4
Apr 29, 2021 2:27 PM UTC

I accidently marked this as correct.

Yes, I used "Library Loaded" and my start/stop is in a "Set Variables" action.

Translate