Question about GoogleAnalytics add-on

Hi,

we are using GoogleAnalytics on our side and while it works, there is some not understood behavior, which is annoying.

We are using UriFragmentUtility, which means that we have only one window instantieted and all the application screens are changed inside this MainWindow. I think therefore GoogleAnalytics cannot get informations which screens did the user navigate to.

I read somewhere that for www.vadin/demo googleanalytics has been used, but you’re also using UriFragmentUtility. So do you also just get information about a single site and cannot determine which screen did the user visit?

Thanks,

Anton

Hi Anton,

I’ve never actually used the Google analytics add-on, but it’s my understanding that you need to call a method that registers the “view” you want to track. A quick look at the example code on the add-on directory page reveals this:

tracker.trackPageview("/samplecode/googleanalytics");

So I’d say that you need to call this trackPageview with a relevant parameter each time the fragment changes.

HTH,
/Jonatan