Security News
38% of CISOs Fear They’re Not Moving Fast Enough on AI
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
analytics-plugin-google-tag-manager
Advanced tools
analytics
Integration with google tag manager for analytics
Install analytics
and analytics-plugin-google-tag-manager
packages
npm install analytics analytics-plugin-google-tag-manager
Import and initialize in project
import Analytics from 'analytics'
import googleTagManager from 'analytics-plugin-google-tag-manager'
const analytics = Analytics({
app: 'awesome-app',
plugins: [
googleTagManager({
containerId: 'GTM-123xyz'
})
]
})
/* 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
We found that analytics-plugin-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
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
Research
Security News
Socket researchers uncovered a backdoored typosquat of BoltDB in the Go ecosystem, exploiting Go Module Proxy caching to persist undetected for years.
Security News
Company News
Socket is joining TC54 to help develop standards for software supply chain security, contributing to the evolution of SBOMs, CycloneDX, and Package URL specifications.