Question

var url;
url = Backbone.history.getFragment();
return ga.push(['_trackPageview', "/" + url]);  // is this right?

I get "undefined" does not have "push".

I am using the latest version of Google Analytics and Backbone.js.

Was it helpful?

Solution

Syntax for the current version (Universal Analytics) would be

ga('send', 'pageview', '/'+url);

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top