Security News
The Dark Side of Open Source
At Node Congress, Socket CEO Feross Aboukhadijeh uncovers the darker aspects of open source, where applications that rely heavily on third-party dependencies can be exploited in supply chain attacks.
angulartics-google-analytics
Advanced tools
Readme
Google Analytics plugin for Angulartics.
First make sure you've read installation and setup instructions for Angulartics.
Then you can install this package either with npm
or with bower
.
npm install angulartics-google-analytics
Then add angulartics.google.analytics
as a dependency for your app:
require('angulartics')
angular.module('myApp', [
'angulartics',
require('angulartics-google-analytics')
]);
Please note that core Angulartics doesn't export the name yet, but it will once we move it into the new organization.
bower install angulartics-google-analytics
Add the <script>
to your index.html
:
<script src="/bower_components/angulartics-google-analytics/dist/angulartics-ga.min.js"></script>
Then add angulartics.google.analytics
as a dependency for your app:
angular.module('myApp', [
'angulartics',
'angulartics.google.analytics'
]);
The 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.
Documentation is available on the Angulartics site.
Module settings are done via the $analyticsProvider.settings.ga
property. The following are GA-specific properties:
transport
(Default: undefined
) -
sets the transport
property for the ga
function call. See the GA Transport Documentation for more information how to properly set this value. This should be a string.npm run build
FAQs
Google Analytics plugin for Angulartics
The npm package angulartics-google-analytics receives a total of 10,294 weekly downloads. As such, angulartics-google-analytics popularity was classified as popular.
We found that angulartics-google-analytics demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
At Node Congress, Socket CEO Feross Aboukhadijeh uncovers the darker aspects of open source, where applications that rely heavily on third-party dependencies can be exploited in supply chain attacks.
Research
Security News
The Socket Research team found this npm package includes code for collecting sensitive developer information, including your operating system username, Git username, and Git email.
Security News
OpenJS is warning of social engineering takeovers targeting open source projects after receiving a credible attempt on the foundation.