Hi,
I'm trying to to implement visitorapi.js outside of DTM and I'm getting the following error:
VisitorAPI.js:6 Uncaught ReferenceError: Visitor is not defined
at Object.<anonymous> (VisitorAPI.js:6)
at Object.n.3../ChildVisitor (VisitorAPI.js:7)
at r (VisitorAPI.js:1)
at e (VisitorAPI.js:1)
at VisitorAPI.js:1
I've copied the code in the implementation guide at the end of the .js file per instructions. Any ideas what could be causing the error?
Views
Replies
Total Likes
Is you website deploying DTM for other solutions, or is DTM not deployed on your site at all? Is there a URL that can be shared here so we can view your implementation and the errors in the console?
Also, can you link to the the implementation guide you used?
Thanks,
Jantzen
Views
Replies
Total Likes
We're not using DTM at all. Unfortunately, the link is in our QA environment and there's not a good way to access it. I can send the visitorapi.js if that would be helpful. Here's the link to the implementation guide: Implement the Marketing Cloud ID Service for Analytics
Views
Replies
Total Likes
Yes, please send me a copy of your VisitorAPI.js file and your AppMeasurement.js file. Also, if you could include a screenshot of the console where you receive this error, that would be helpful.
Thanks,
Jantzen
Views
Replies
Total Likes
Is there a way to attach files in the forum?
Views
Replies
Total Likes
Try editing your original post. Replies don't allow for attachments, but the original post should allow for it. If that doesn't work, you could always use something like GitHub to host your code and link us to the repo.
Views
Replies
Total Likes
Here's the link to the visitorapi.js: https://github.com/andyma1991/visitorapi/blob/master/visitorapi-orgid3.txt
Views
Replies
Total Likes
Were you able to also supply your AppMeasurement file?
I'd like to verify that Step 5 has been completed and
s.visitor = Visitor.getInstance("INSERT-MARKETING-CLOUD-ORGANIZATION ID-HERE");
Is shown in your AppMeasurement file.
Views
Replies
Total Likes
We use Tealium as our TMS and the consultant who implemented Tealium put in a s_doPlugins extension.
Here's a copy of the extension: visitorapi/s_doplugin.txt at master · andyma1991/visitorapi · GitHub
Views
Replies
Total Likes
Looking at the GitHub repo you posted, I don't see where the consultant implemented the following instructions:
Views
Replies
Total Likes
Views
Likes
Replies
Views
Like
Replies
Views
Likes
Replies