
Security News
Re-Enabled GitHub Actions Expose Thousands of Repositories to Mini Shai-Hulud
Two compromised GitHub Actions were re-enabled with malicious tags intact, exposing thousands of downstream repositories to Mini Shai-Hulud.
@taxi_tabby/react-eventflow
Advanced tools
React event tracking library with Provider pattern for collecting user interactions and sending to backend
A React-based event tracking library that collects user interactions using the Provider pattern and sends them to your backend.
npm install @taxi_tabby/react-eventflow
or
yarn add @taxi_tabby/react-eventflow
Add EventFlowProvider at the root of your app:
import { EventFlowProvider } from '@taxi_tabby/react-eventflow';
function App() {
return (
<EventFlowProvider
config={{
onEvent: async (event) => {
// Send event to your backend
await fetch('/api/events', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify(event),
});
},
trackPageViews: true,
trackNavigation: true,
trackReferral: true,
trackMouseClick: true, // Enable click tracking
trackMouseMoving: false, // Enable mouse movement tracking (can be noisy)
trackScroll: true, // Enable scroll tracking
debug: process.env.NODE_ENV === 'development',
}}
>
<YourApp />
</EventFlowProvider>
);
}
Use the useEventFlow hook in your components:
import { useEventFlow } from '@taxi_tabby/react-eventflow';
function CustomPage() {
const { trackPageView } = useEventFlow();
useEffect(() => {
trackPageView('/custom-page', 'Custom Page Title');
}, []);
return <div>...</div>;
}
interface EventFlowConfig {
/** Event callback function (required) */
onEvent: (event: EventData | EventData[]) => void | Promise<void>;
/** Enable automatic pageview tracking (default: true) */
trackPageViews?: boolean;
/** Enable automatic navigation tracking (default: true) */
trackNavigation?: boolean;
/** Enable automatic referral tracking (default: true) */
trackReferral?: boolean;
/** Enable automatic mouse click tracking (default: false) */
trackMouseClick?: boolean;
/** Enable automatic mouse moving tracking (default: false) */
trackMouseMoving?: boolean;
/** Mouse moving throttle interval in ms (default: 100) */
mouseMovingThrottle?: number;
/** Enable automatic scroll tracking (default: false) */
trackScroll?: boolean;
/** Scroll throttle interval in ms (default: 200) */
scrollThrottle?: number;
/** Debug mode (default: false) */
debug?: boolean;
/** Enable event batching (default: false) */
enableBatching?: boolean;
/** Batching interval in ms (default: 2000) */
batchInterval?: number;
}
All events include a fingerprint field for unique user identification.
{
type: 'pageview',
timestamp: 1699999999999,
fingerprint: 'unique-browser-id',
payload: {
url: '/products',
title: 'Products Page',
referrer: 'https://google.com',
userAgent: 'Mozilla/5.0...'
}
}
{
type: 'referral',
timestamp: 1699999999999,
fingerprint: 'unique-browser-id',
payload: {
currentUrl: 'https://example.com/products?utm_source=google',
referrer: 'https://google.com/search?q=products',
referrerDomain: 'google.com',
sourceType: 'search', // 'direct' | 'external' | 'internal' | 'social' | 'search' | 'email' | 'unknown'
utm: {
source: 'google',
medium: 'cpc',
campaign: 'summer_sale',
term: 'products',
content: 'ad_variant_a'
},
queryParams: {
utm_source: 'google',
utm_medium: 'cpc',
// ... all query parameters
},
navigation: {
historyLength: 5,
isBackNavigation: false,
navigationType: 'navigate'
}
}
}
{
type: 'navigation',
timestamp: 1699999999999,
fingerprint: 'unique-browser-id',
payload: {
from: '/home',
to: '/products'
}
}
{
type: 'mouse-moving',
timestamp: 1699999999999,
fingerprint: 'unique-browser-id',
payload: {
x: 100,
y: 200,
pageX: 100,
pageY: 500
}
}
{
type: 'mouse-click',
timestamp: 1699999999999,
fingerprint: 'unique-browser-id',
payload: {
x: 100,
y: 200,
target: 'button',
targetClass: 'btn-primary',
targetId: 'submit-btn',
button: 0
}
}
{
type: 'scroll',
timestamp: 1699999999999,
fingerprint: 'unique-browser-id',
payload: {
scrollY: 500,
scrollX: 0,
scrollDepth: 25,
documentHeight: 2000
}
}
Enable batching to reduce network requests:
<EventFlowProvider
config={{
onEvent: handleEvents,
enableBatching: true,
batchInterval: 5000, // Send every 5 seconds
}}
>
<App />
</EventFlowProvider>
Enable different types of user interaction tracking:
<EventFlowProvider
config={{
onEvent: handleEvents,
// Basic tracking (enabled by default)
trackPageViews: true,
trackNavigation: true,
trackReferral: true,
// Interaction tracking (disabled by default)
trackMouseClick: true, // Track all click events
trackMouseMoving: true, // Track mouse movements (can generate many events)
mouseMovingThrottle: 100, // Send mouse move event every 100ms
trackScroll: true, // Track scroll depth
scrollThrottle: 200, // Send scroll event every 200ms
}}
>
<App />
</EventFlowProvider>
Note on Performance:
mouseMovingThrottle to control frequency.passive event listeners to avoid blocking the main thread.Every event automatically includes a browser fingerprint for user identification:
{
fingerprint: 'abc123def456', // Unique per browser
type: 'pageview',
// ...
}
This fingerprint is:
MIT
Issues and PRs are always welcome!
FAQs
React event tracking library with Provider pattern for collecting user interactions and sending to backend
The npm package @taxi_tabby/react-eventflow receives a total of 0 weekly downloads. As such, @taxi_tabby/react-eventflow popularity was classified as not popular.
We found that @taxi_tabby/react-eventflow 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.

Security News
Two compromised GitHub Actions were re-enabled with malicious tags intact, exposing thousands of downstream repositories to Mini Shai-Hulud.

Research
/Security News
A malicious Firefox extension fetches its payload after installation to evade detection, steal Google session cookies, and automate account takeover.

Research
/Security News
The compromise affects MemTensor's MemOS, an open source memory framework for large language models (LLMs) and AI agents. Both npm package @memtensor/memos-cloud-openclaw-plugin and the PyPI package MemoryOS are compromised. They drop cross-platform Go binaries that exfiltrate developer secrets.