Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
analyticsjs-boilerplate
Advanced tools
Examples and best practices for using analytics.js
Best practices for implementing analytics.js on modern websites.
For an in-depth explanation of all the features used in this boilerplate (as well as how to report on them), see my article:
The Google Analytics Setup I Use on Every Site I Build →
analytics/base.js
The base boilerplate extends the default tracking snippet and includes the following features:
analytics/autotrack.js
The autotrack boilerplate builds on top the base boilerplate and includes select autotrack plugins
analytics/multiple-trackers.js
The multiple-trackers boilerplate builds on the autotrack boilerplate and includes support for using multiple trackers.
analytics.js boilerplate uses webpack to compile the source and webpack-dev-server to run it locally.
To install the dependencies and load the boilerplate in a browser, run the following commands:
npm install
npm start
Then visit localhost:8080 in your browser and open the developer console to see the analytics.js debug output.
The boilerplate index.js
JavaScript file imports the base boilerplate by default. To run a different version, replace the URL imported via import('./analytics/base.js')
with the version you want to load.
FAQs
Examples and best practices for using analytics.js
We found that analyticsjs-boilerplate 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.
Research
Security News
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.