Is there any reason why this function would be flagged as not a function by my browser? I've followed the documentation on how to implement this for my website but it is still flagging it as an issue.
This error only occurs in the VisitorAPI.js
and AppMeasurement.js
files given to me by Adobe, and both are version 1.5.1.
VisitorAPI.js
var visitor = Visitor.getInstance("INSERT-MCORG-ID-HERE");
visitor.trackingServer = "INSERT-TRACKING-SERVER-HERE"; // same as s.trackingServer
visitor.trackingServerSecure = "INSERT-SECURE-TRACKING-SERVER-HERE"; //same as s.trackingServerSecure
/*
============== DO NOT ALTER ANYTHING BELOW THIS LINE ! ============
AppMeasurement.js
//initialize AppMeasurement
var s_account="INSERT-RSID-HERE"
var s=s_gi(s_account)
/******** VISITOR ID SERVICE CONFIG - REQUIRES VisitorAPI.js ********/
s.visitor=Visitor.getInstance("INSERT-MCORG-ID-HERE")
I only have these two files included on each page and they house the only two places Visitor.getInstance() is called. Am I doing something wrong?
In your VisitorAPI.js file you need to move your visitor initialisation code to below the minified, obfuscated core code. Move it right to the bottom.
The code i'm talking about is:
var visitor = Visitor.getInstance("INSERT-MCORG-ID-HERE");
visitor.trackingServer = "INSERT-TRACKING-SERVER-HERE"; // same as s.trackingServer
visitor.trackingServerSecure = "INSERT-SECURE-TRACKING-SERVER-HERE"; //same as s.trackingServerSecure
You currently have it at the top which is before 'Visitor' is defined. Once it's at the bottom, Visitor will be defined and you'll be away.
The docs that describe this are here (you'll need an Adobe Analytics login I think): https://marketing.adobe.com/resources/help/en_US/mcvid/mcvid_implement.html
Let me know how you get on.