我像这样将 angulartics 添加到我的混合应用程序中:</p>
<script src="./js/angulartics.js"></script>
<script src="./js/angulartics-ga-cordova.js"></script>
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function()
{ (i[r].q=i[r].q||[]).push(arguments)}
,i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-xxxx-1', 'auto');
ga('send', 'event', 'button', 'click', 'nav buttons', 4);
</script>
在 script.js 中是这样的:
var module = ons.bootstrap('my-app', ['onsen','ngSanitize','ngCookies','ngStorage', 'angulartics','angulartics.google.analytics.cordova']);
但我也无法在谷歌分析实时报告中跟踪我的混合应用程序页面视图。有人知道怎么做吗?