在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称(OpenSource Name):angulartics/angulartics-google-analytics开源软件地址(OpenSource Url):https://github.com/angulartics/angulartics-google-analytics开源编程语言(OpenSource Language):JavaScript 84.1%开源软件介绍(OpenSource Introduction):angulartics-google-analyticsGoogle Analytics plugin for Angulartics. InstallFirst make sure you've read installation and setup instructions for Angulartics. Then you can install this package either with npmnpm install angulartics-google-analytics Then add require('angulartics')
angular.module('myApp', [
'angulartics',
require('angulartics-google-analytics')
]);
bowerbower install angulartics-google-analytics Add the <script src="/bower_components/angulartics-google-analytics/dist/angulartics-ga.min.js"></script> Then add angular.module('myApp', [
'angulartics',
'angulartics.google.analytics'
]); Changes in the Google Analytics snippetThe snippet code provided by Google Analytics does an automatic pageview hit, but this is already done by Angulartics (unless you disable it) so make sure to delete the tracking line: ...
ga('create', 'UA-XXXXXXXX-X', 'none'); // 'none' while you are working on localhost
ga('send', 'pageview'); // DELETE THIS LINE!
</script> Done. Open your app, browse across the different routes and check the realtime GA dashboard to see the hits. DocumentationDocumentation is available on the Angulartics site. SettingsModule settings are done via the
Developmentnpm run build License |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论