
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
app-usage-events-react
Advanced tools
A set of types, type checks, and type guards for simpler, safer, and easier to read code.
utility to easily emit app-usage-events from your app to the mhetrics platform
npm install @mhetrics/app-usage-events-react
Add the provider to your react app. This provider is responsible for
import { AppUsageEventsEmitter } from '@mhetrics/app-usage-events-react';
<AppUsageEventsEmitter
clientKey={config.mhetrics.clientKey}
captureHost={config.mhetrics.captureHost}
/>
With that, your app will automatically be emitting
Your app is now also configured to emit observation events. Observation events are produced by your application to track observations useful for analytics. Here is an example of how to emit observation events
import { captureObservationEvent } from '@mhetrics/app-usage-events-react';
await captureObservationEvent({
/**
* the type of the observation you are reporting
*/
type: 'experiment.exposure', // for example, tracking that a user was exposed to an experiment
/**
* details about the observation
*/
details: {
experiment: 'show-reviews?', // for example, an experiment about whether or not reviews should be shown
treatment: 'CONTROL', // for example, tracking that they were exposed to the CONTROL treatment of the experiment
}
})
FAQs
A set of types, type checks, and type guards for simpler, safer, and easier to read code.
We found that app-usage-events-react demonstrated a healthy version release cadence and project activity because the last version was released less than 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
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.