getVisitStart is not a function | Community
Skip to main content
September 6, 2018
Solved

getVisitStart is not a function

  • September 6, 2018
  • 1 reply
  • 3427 views

In Configure Tracker Using Custom Code I have:

var s_visitStart = s.getVisitStart('sc_visit_start');

This throws the error:

Uncaught (in promise) TypeError: e.getVisitStart is not a function.

getVisitStart is a supported plugin according to appmeasurement documentation.

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 MktgCloudUser

I was getting the same error due to confusion over where to place the plugin code.  In short, the actual plugin code should be outside of the do

s.getVisitStart=newFunction(...);

s.usePlugins=true;

s.doPlugins=function(s) {

  // usage here

  var s_visitStart = s.getVisitStart('sc_visit_start');

}

Can't Get Analytics Plugins Working

1 reply

MktgCloudUser
MktgCloudUserAccepted solution
Level 4
October 8, 2018

I was getting the same error due to confusion over where to place the plugin code.  In short, the actual plugin code should be outside of the do

s.getVisitStart=newFunction(...);

s.usePlugins=true;

s.doPlugins=function(s) {

  // usage here

  var s_visitStart = s.getVisitStart('sc_visit_start');

}

Can't Get Analytics Plugins Working