Security News
vlt Debuts New JavaScript Package Manager and Serverless Registry at NodeConf EU
vlt introduced its new package manager and a serverless registry this week, innovating in a space where npm has stagnated.
@analytics/google-tag-manager
Advanced tools
analytics
Note: This package has moved to @analytics/google-tag-manager
Integration with google tag manager for analytics
For more information see the docs.
Install analytics
and @analytics/google-tag-manager
packages
npm install analytics @analytics/google-tag-manager
Import and initialize in project
import Analytics from 'analytics'
import googleTagManager from '@analytics/google-tag-manager'
const analytics = Analytics({
app: 'awesome-app',
plugins: [
googleTagManager({
containerId: 'GTM-123xyz',
})
// ... other plugins
]
})
/* Track page views */
analytics.page()
/* Track custom events */
analytics.track('buttonClicked')
/* Identify visitors */
analytics.identify('user-xzy-123', {
name: 'Bill Murray',
cool: true
})
Make sure you have your google tags manager setup to fire on Page views.
If you are using a SPA you want to listen to history changes as well.
Arguments
object
- Plugin settingsstring
- The Container ID uniquely identifies the GTM Container.Example
googleTagManager({
containerId: 'GTM-123xyz'
})
See the full list of analytics provider plugins in the main repo.
FAQs
Google tag manager plugin for 'analytics' module
The npm package @analytics/google-tag-manager receives a total of 22,451 weekly downloads. As such, @analytics/google-tag-manager popularity was classified as popular.
We found that @analytics/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
vlt introduced its new package manager and a serverless registry this week, innovating in a space where npm has stagnated.
Security News
Research
The Socket Research Team uncovered a malicious Python package typosquatting the popular 'fabric' SSH library, silently exfiltrating AWS credentials from unsuspecting developers.
Security News
At its inaugural meeting, the JSR Working Group outlined plans for an open governance model and a roadmap to enhance JavaScript package management.