I have a mobile website we are building. It will be a single page website using AngularJS for the MVC parts. We need to plug in WebTrends tracking to it. However since it is a single page that just uses JS to change the UI I am not sure how we tell/trigger WebTrends to know a new page and been rendered and what that new page is.
Anyone know?
I am not familiar with AngularJS, but I have used WebTrends a bit. What I have done in the past to capture user behavior is write my own JavaScript code (you can add it to webtrends.js or your own custom JS file) and then add calls to my JS functions in the HTML elements. My code then called
dcsMultiTrack()
with parameters for whatever information I needed to send to WebTrends.For example, if you want to know when a user clicks on some buttom, add something like
onClick() = myFunction()
to the html element. Inside ofmyFunction()
, have some code to determine what the user is doing and whatever else you want to track. Then calldcsMultiTrack()
, passing in the parameters you just determined. If I remember correctly,dcsMultiTrack()
allows for flexible lengths of parameters, provided they come in pairs of variable / value, like 'WT.ti','My Page','DCSExt.user_id','your name', etc.