Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
angulartics-google-tag-manager
Advanced tools
Readme
Google Tag Manager 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-tag-manager
Then add angulartics.google.tagmanager
as a dependency for your app:
require('angulartics')
angular.module('myApp', [
'angulartics',
require('angulartics-google-tag-manager')
]);
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-tag-manager
Add the <script>
to your index.html
:
<script src="/bower_components/angulartics-google-analytics/dist/angulartics-google-analytics.min.js"></script>
Then add angulartics.google.tagmanager
as a dependency for your app:
angular.module('myApp', [
'angulartics',
'angulartics.google.tagmanager'
]);
Once you've installed Angulartics into your application, you'll need to perform some configuration in the Google Tag Manager interface. There are two ways to do this; using Google Tag Manager's import functionality, or by manually configuring the required components in Google Tag Manager. To do either, you will need Edit permissions in the Google Tag Manager Container you'd like to use.
Before beginning configuration, confirm which version of Google Analytics you're using in your application. A simple way to test this is to check the Google Analytics snippet, if there is one. If the code looks like the below, you're using Universal Analytics:
ga('create', 'UA-XXXXXX-YY', 'auto');
ga('send', 'pageview');
Alternatively, if the snippet looks like the below, you've got Classic Analytics installed, which is in the process of being deprecated:
_gaq.push(['_setAccount', 'UA-XXXXXX-YY']);
_gaq.push(['_trackPageview']);
If possible, consider switching to Universal Analytics. If neither appear, or you do not have Google Analytics installed, use the Universal Analytics instructions.
6 Variables
Naming and case must match.
2 Triggers
Name and case must match.
2 Tags
Name and case must match.
Name: Angulartics Events
Name: Angulartics Pageviews
6 Variables
Naming and case must match.
2 Triggers
Name and case must match.
2 Tags
Name and case must match.
Universal Analytics, the newest version of Google Analytics, supports tracking users based of an ID that you provide. Typically, this ID is available after a user logs in to your application or service. Providing this ID allows Google Analytics to aggregate across multiple devices and browsers, providing a more holistic view of user interaction with your services. The documentation can provide more insight into the benefits of using the User ID feature. It also stipulates the following:
To configure User ID Tracking, set the $analyticsProvider.settings.ga.userId
property to your provided User ID in the module configuration settings.
angular.module('myApp', ['angulartics', 'angulartics.google.tagmanager'])
.config(['$analyticsProvider', function ($analyticsProvider) {
$analyticsProvider.settings.ga = {
userId: myUserIdValue
};
...
}]);
Alternatively, you may set your User ID by calling $analytics.setUsername()
and providing it your userId
$analytics.setUsername(myUserIdValue);
Additional documentation is available on the Angulartics site.
npm run build
FAQs
Google Tag Manager plugin for Angulartics
The npm package angulartics-google-tag-manager receives a total of 1,388 weekly downloads. As such, angulartics-google-tag-manager popularity was classified as popular.
We found that angulartics-google-tag-manager demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.