Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Easy, strong typed, and a modern way to use google analytics gtag lib.
Both umd and es bundles are produced, along with type definitions.
npm i mr-gtag
First, calling installGtag
injects the lib:
import { installGtag } from 'mr-gtag';
installGtag(trackingId);
This injects the lib and then calls what is equivalent to gtag('config', trackingId, ...);
.
Some options are available here:
import { installGtag } from 'mr-gtag';
installGtag(trackingId, {
send_page_view: false, // If set to false, tells gtag to not send the default pageview event. Default is true.
user_id: 'USER_ID', // You can set the user_id like this
// Or any other option supported by the google gtag lib
});
From here on, use any of the gtag functions available.
Send an event:
import { gtag } from 'mr-gtag';
gtag('event', 'page_view', { ... });
Refer to the google docs for more info and to see the different kinds of events you can send.
installGtag
accepts were renamed to be the exact same as the gtag ones. Be sure to update those.FAQs
Easy, strong typed, and a modern way to use google analytics gtag lib.
We found that mr-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.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.