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.
google-analytics-ga4
Advanced tools
Readme
This is very first test Run Will be completing it within 1 month.
import GA4 from "google-analytics-ga4";
import GA4 from "google-analytics-ga4";
GA4.initialize("your GA measurement id");
GA4.send("pageview");
// Multiple products (previously known as trackers)
GA4.initialize([
{
trackingId: "your GA measurement id",
gaOptions: {...}, // optional
gtagOptions: {...}, // optional
},
{
trackingId: "your second GA measurement id",
},
]);
// Send pageview with a custom path
GA4.send({ hitType: "pageview", page: "/my-path" });
// Send a custom event
GA4.event({
category: "your category",
action: "your action",
label: "your label", // optional
value: 99, // optional, must be a number
nonInteraction: true, // optional, true/false
transport: "xhr", // optional, beacon/xhr/image
});
Parameter | Notes |
---|---|
GA_MEASUREMENT_ID | string Required |
options.nonce | string Optional Used for Content Security Policy (CSP) more |
options.testMode | boolean Default false |
options.gaOptions | object Optional Reference |
options.gtagOptions | object Optional |
options.legacyDimensionMetric | boolean Default true |
Parameter | Notes |
---|---|
fieldsObject | object Required |
This method signature are NOT for UA-XXX
Parameter | Notes |
---|---|
name | string Required A recommended event or a custom event |
params | object Optional |
Parameter | Notes |
---|---|
options | object Required |
options.action | string Required |
options.category | string Required |
options.label | string Optional |
options.value | number Optional |
options.nonInteraction | boolean Optional |
options.transport | 'beacon'|'xhr'|'image' Optional |
options.dimension{1...200} | any Optional |
options.metric{1...200} | any Optional |
Parameter | Notes |
---|---|
fieldsObject | object Required |
Deprecated Use .send("pageview")
instead
Deprecated Use enhanced measurement
feature in Google Analytics.
import { ReactGAImplementation } from "google-analytics-ga4";
class MyCustomOverriddenClass extends ReactGAImplementation {}
export default new MyCustomOverriddenClass();
Use Google Analytics Debugger Chrome Extension to see logs
MIT
FAQs
This is package for google analytics GA4 .You can import it to any node project and use it .React , Vue, Anguler etc
The npm package google-analytics-ga4 receives a total of 233 weekly downloads. As such, google-analytics-ga4 popularity was classified as not popular.
We found that google-analytics-ga4 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.