Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
ga4-mp
Advanced tools
Readme
This library provides an interface for sending data to Google Analytics 4 properties using Measurement Protocol.
NOTE Google Analytics 4 is in Alpha as of the latest update
BSD 3-Clause license can be found in ./LICENSE
npm install -s ga4-mp
ga4mp = require('ga4-mp');
let ga4 = ga4mp.createClient(apiSecret, measurementId, clientId);
You can send events to GA4 as they happen or batch them to be sent at another time of your choosing.
ga4.send(<events>);
ga4.send(<events>, true); // Set postpone flag
ga4.flushBuffer(); // Send all postponed events
var events = [
{
name : 'add_to_cart',
params : {
currency : 'USD',
items : ['Pokémon cards'],
value : "4.99"
}
},
{
name : 'app_update',
params : {
previous_app_version : '4.6'
}
}
]
Events are expected to be passed to the send() function within an array and matching the object schema found in the Google Analytics 4 documentation.
ga4.setConstantParam(key, value); // Set a constant
ga4.unsetConstantParam(key); // Remove a constant
Set custom dimensions/metrics, country codes, etc. for all outgoing events. You can unset them too.
ga4.readClientInfo();
FAQs
Send data to Google Analytics 4 using Measurement Protocol
The npm package ga4-mp receives a total of 126 weekly downloads. As such, ga4-mp popularity was classified as not popular.
We found that ga4-mp 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
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.