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.

有帮助吗?

解决方案

Syntax for the current version (Universal Analytics) would be

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

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top