Pregunta

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.

¿Fue útil?

Solución

Syntax for the current version (Universal Analytics) would be

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

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top