Pergunta

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.

Foi útil?

Solução

Syntax for the current version (Universal Analytics) would be

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

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top