문제

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