
Product
Introducing Rust Support in Socket
Socket now supports Rust and Cargo, offering package search for all users and experimental SBOM generation for enterprise projects.
@nuxtjs/google-tag-manager
Advanced tools
[](https://www.npmjs.com/package/@nuxtjs/google-tag-manager) [ to your nuxt.js application. This plugins automatically sends first page and route change events to GTM.
@nuxtjs/google-tag-manager
dependency using yarn or npm to your project@nuxtjs/google-tag-manager
to modules
section of nuxt.config.js
modules: [
['@nuxtjs/google-tag-manager', { id: 'GTM-XXXXXXX' }],
]
id
GTM-XXXXXXX
// Returns Promise
id: () => {
return axios.get('http://example.com/')
.then(({ data }) => {
return data.gtm_id
})
}
// Returns String
const code = '1234567'
id: () => {
return 'GTM-' + code
}
{
id: 'GTM-XXXXXXX',
layer: 'dataLayer',
pageTracking: false,
dev: true, // set to false to disable in dev mode
query: {
// query params...
gtm_auth: '...',
gtm_preview: '...',
gtm_cookies_win: '...'
},
scriptURL: '//example.com'
}
You can optionally set pageTracking
option to true
to track page views.
This is disabled by default to prevent double events when using alongside with Google Analytics so take care before enabling this option.
You can push events into the configured layer
:
this.$gtm.pushEvent({ event: 'myEvent', ...someAttributes })
FAQs
[](https://www.npmjs.com/package/@nuxtjs/google-tag-manager) [![npm (scoped with tag)](https://img.shields.io/npm/v/@nuxtjs/google-tag-manager/latest.svg?style=flat-squa
We found that @nuxtjs/google-tag-manager demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 5 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.
Product
Socket now supports Rust and Cargo, offering package search for all users and experimental SBOM generation for enterprise projects.
Product
Socket’s precomputed reachability slashes false positives by flagging up to 80% of vulnerabilities as irrelevant, with no setup and instant results.
Product
Socket is launching experimental protection for Chrome extensions, scanning for malware and risky permissions to prevent silent supply chain attacks.