Security News
Weekly Downloads Now Available in npm Package Search Results
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
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 --save mr-gtag
First, installing gtag injects the lib:
import { installGtag } from 'mr-gtag';
installGtag(trackingId);
This is equivalent to gtag('config', trackingId, ...);
.
Some options are available here:
import { installGtag } from 'mr-gtag';
installGtag(trackingId, {
sendDefaultPageView: false, // If set to false, tells gtag to not send the default pageview event. Default is true.
});
From here on, use any of the gtag functions available.
Set a value:
import { gtag } from 'mr-gtag';
gtag('set', { ... })
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.
npm i -g rollup
npm i
FAQs
Easy, strong typed, and a modern way to use google analytics gtag lib.
The npm package mr-gtag receives a total of 92 weekly downloads. As such, mr-gtag popularity was classified as not popular.
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.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
Security News
A Stanford study reveals 9.5% of engineers contribute almost nothing, costing tech $90B annually, with remote work fueling the rise of "ghost engineers."
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.