WebTrends with one website

I have a mobile site that we are building. This will be a single page page using AngularJS for parts of MVC. We need to enable WebTrends tracking. However, since this is the only page that simply uses JS to change the user interface, I'm not sure how we tell / launch WebTrends to know the new page and be visualized, and what the new page is.

Somebody knows?

+6
source share
2 answers

Magnilex is exactly right - the client side, you can call dcsMultiTrack () to simulate the rendering of the page. I would suggest a few things:

  • Do not put any custom code in WebTrends.js. You will update this file in the future if you upgrade to the new version of the WebTrends tag, so it is better to leave this file as is.
  • You may need to exclude the initial call to WebTrends, which will register the first page that will be presented so that you do not receive two calls to display the first page. Check out the WebTrends report and see if you get a double hit for the first page - if so, you can call dcsCollect () at the beginning using standard javascript to initialize WebTrends.
  • dcsMultiTrack () by default contains nothing but the name / value pairs that you pass. If you need advanced information (there are meta tags and many other tags that WebTrends are available, but they are ignored by dcsMultiTrack ()), you may need to call dcsCollect, etc., to make sure that you pass them together.

Good luck

+3
source

I am not familiar with AngularJS, but I used WebTrends a bit. What I did in the past to capture user behavior was to write my own JavaScript code (you can add it to webtrends.js or your own JS file) and then add calls to my JS functions in the HTML elements. Then my code called dcsMultiTrack() with parameters for any information I needed to send to WebTrends.

For example, if you want to know when the user clicks on a button, add something like onClick() = myFunction() to the html element. Inside myFunction() there is code to determine what the user is doing and everything you want to track. Then call dcsMultiTrack() , passing the parameters you just defined. If I remember correctly, dcsMultiTrack() allows flexible parameter lengths, provided that they fall into pairs of variables / values, such as "WT.ti", "My Page", "DCSExt.user_id", "your name", etc. d.

-1
source

Source: https://habr.com/ru/post/951170/


All Articles