getVisitStart is not a function

Avatar

Avatar
Validate 1
Level 1
e-v-p
Level 1

Likes

0 likes

Total Posts

1 post

Correct reply

0 solutions
Top badges earned
Validate 1
View profile

Avatar
Validate 1
Level 1
e-v-p
Level 1

Likes

0 likes

Total Posts

1 post

Correct reply

0 solutions
Top badges earned
Validate 1
View profile
e-v-p
Level 1

06-09-2018

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.

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Validate 10
Level 2
MktgCloudUser
Level 2

Likes

14 likes

Total Posts

43 posts

Correct reply

2 solutions
Top badges earned
Validate 10
Validate 1
Ignite 1
Give Back
Boost 5
View profile

Avatar
Validate 10
Level 2
MktgCloudUser
Level 2

Likes

14 likes

Total Posts

43 posts

Correct reply

2 solutions
Top badges earned
Validate 10
Validate 1
Ignite 1
Give Back
Boost 5
View profile
MktgCloudUser
Level 2

08-10-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

Answers (0)