
Security News
vlt Launches "reproduce": A New Tool Challenging the Limits of Package Provenance
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
@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 23,453 weekly downloads. As such, @analytics/google-tag-manager popularity was classified as popular.
We found that @analytics/google-tag-manager demonstrated a healthy version release cadence and project activity because the last version was released less than 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's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
Research
Security News
Socket researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
Research
The Socket Research Team discovered a malicious npm package, '@ton-wallet/create', stealing cryptocurrency wallet keys from developers and users in the TON ecosystem.