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
Solved! Go to Solution.
Views
Replies
Total Likes
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) 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.
I accidently marked this as correct.
Yes, I used "Library Loaded" and my start/stop is in a "Set Variables" action.
Views
Replies
Total Likes
I tried setting up a rule to load on "Core - Library Loaded (Page Top)"
Here's the code:
s.getTimeToComplete("start");
var Time = s.getTimeToComplete("stop");
_satellite.logger.info('Time:' + Time)
Here's the error in Sources
Views
Replies
Total Likes
Views
Replies
Total Likes
Views
Replies
Total Likes
Views
Replies
Total Likes
Views
Replies
Total Likes
Views
Replies
Total Likes
Ok, I think I've found it. The "s" object has been overridden by another script from trkn.us. This trkn.us script is being loaded from utag.js, i.e. from Tealium. So because the "s" object is being overridden, the Adobe Analytics tracking is basically broken.
The solution is: remove whatever is calling that trkn.us script from Tealium, or change it such that it doesn't override the "s" object at the global window level.
How I found it:
Expected result: A JavaScript object that is the Adobe Analytics tracker.
Actual result: A <script> that calls that trkn.us script.
Views
Replies
Total Likes
Views
Replies
Total Likes
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");
Views
Replies
Total Likes
Views
Likes
Replies