Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
@nuxtjs/google-gtag
Advanced tools
Google official gtagjs for Nuxt.js
The module includes Google googletagmanager.com/gtag/js
into your project and enables it with config you pass in as options.
@nuxtjs/google-gtag
dependency using yarn or npm to your project@nuxtjs/google-gtag
to modules
section of nuxt.config.js
{
modules: [
// Simple usage
'@nuxtjs/google-gtag',
// With options
['@nuxtjs/google-gtag', { /* module options */ }],
]
// example config
'google-gtag':{
id: 'UA-XXXX-XX', // required
config:{
// this are the config options for `gtag
// check out official docs: https://developers.google.com/analytics/devguides/collection/gtagjs/
anonymize_ip: true, // anonymize IP
send_page_view: false, // might be necessary to avoid duplicated page track on page reload
linker:{
domains:['domain.com','domain.org']
}
},
debug: true, // enable to track in dev mode
disableAutoPageTrack: false, // disable if you don't want to track each page route with router.afterEach(...)
// optional you can add more configuration like [AdWords](https://developers.google.com/adwords-remarketing-tag/#configuring_the_global_site_tag_for_multiple_accounts)
additionalAccounts:[{
id: 'AW-XXXX-XX', // required if you are adding additional IDs
config:{
send_page_view:false // optional configurations
}
}]
}
}
This module inlcudes Google gtag in your NuxtJs project and enables every page tracking by default. You can use gtag inside of your components/functions/methods like follow:
this.$gtag('event', 'your_event', { /* track something awesome */})
Install Google Tag Assistant
and see if your page is being tracked.
yarn install
or npm install
npm run dev
Copyright (c) Dominic Garms djgarms@gmail.com
FAQs
Google GTag for Nuxt.js
The npm package @nuxtjs/google-gtag receives a total of 6,508 weekly downloads. As such, @nuxtjs/google-gtag popularity was classified as popular.
We found that @nuxtjs/google-gtag 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
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.