
Security News
npm Tooling Bug Incorrectly Marks One-Character Packages as Security Holders
npm confirmed a tooling bug incorrectly marked several one-character packages as security holders and said it was working on a rollback.
@plasius/analytics
Advanced tools
Local-space analytics client and React helpers for interaction/event tracking with configurable ingestion endpoints.
Local-space analytics primitives for browser apps and reusable React components.
localStorage backup)visibilitychange, pagehide, sendBeacon)npm install @plasius/analytics
import {
createBackendAnalyticsClient,
createFrontendAnalyticsClient,
} from "@plasius/analytics";
const frontendAnalytics = createFrontendAnalyticsClient({
source: "sharedcomponents",
endpoint: "https://analytics.example.com/collect",
defaultContext: {
application: "white-label-portal",
},
});
const backendAnalytics = createBackendAnalyticsClient({
source: "plasius-ltd-site-api",
endpoint: "https://analytics.example.com/collect",
});
frontendAnalytics.track({
component: "Header",
action: "nav_click",
label: "About",
href: "/about",
context: {
surface: "desktop",
},
});
backendAnalytics.track({
component: "VideoWorker",
action: "job_completed",
requestId: "req-123",
context: { worker: "render" },
});
await frontendAnalytics.flush();
await backendAnalytics.flush();
import { createFrontendAnalyticsClient } from "@plasius/analytics";
const analytics = createFrontendAnalyticsClient({
source: "sharedcomponents",
endpoint: "https://analytics.example.com/collect",
errorReporting: {
thresholdCount: 5,
thresholdWindowMs: 300000,
onThresholdReached: ({ report }) => {
// Hook into your automation system (ticket/task/alert)
console.log("error threshold reached", report.fingerprint, report.count);
},
},
});
analytics.reportError({
boundary: "CheckoutBoundary",
error: new Error("Payment failed"),
context: {
feature: "checkout",
ipAddress: "198.51.100.10",
sessionToken: "opaque-session-token",
},
});
const issueReports = analytics.getIssueReports();
Error reporting is secure-by-default. When secureEndpointOnly is enabled (default), crash reports are sent only to https endpoints (or localhost for development).
PII/private-data handling for crash payloads is delegated to @plasius/schema as the source of truth:
prepareForStorage, which applies field-level hashing/redaction policies before transport.import {
AnalyticsProvider,
useComponentInteractionTracker,
} from "@plasius/analytics";
function SaveButton() {
const track = useComponentInteractionTracker("SaveButton", {
feature: "document-editor",
});
return (
<button
type="button"
onClick={() => track("click", { label: "Save" })}
>
Save
</button>
);
}
<AnalyticsProvider
source="sharedcomponents"
endpoint="https://analytics.example.com/collect"
channel="frontend"
>
<SaveButton />
</AnalyticsProvider>;
POST body:
{
"source": "sharedcomponents",
"channel": "frontend",
"runtime": "browser",
"sentAt": 1735300000000,
"events": [
{
"id": "event_xxx",
"source": "sharedcomponents",
"channel": "frontend",
"runtime": "browser",
"sessionId": "session_xxx",
"timestamp": 1735300000000,
"kind": "error",
"component": "Header",
"action": "error_boundary_caught",
"label": "err_abc123",
"error": {
"boundary": "CheckoutBoundary",
"name": "Error",
"message": "Payment failed",
"fingerprint": "err_abc123",
"handled": true,
"severity": "error"
},
"context": {
"analyticsChannel": "frontend",
"analyticsRuntime": "browser",
"feature": "checkout",
"errorFingerprint": "err_abc123",
"errorBoundary": "CheckoutBoundary",
"errorSeverity": "error",
"errorHandled": true
}
}
]
}
npm install
npm run typecheck
npm run build
npm test
npm run test:coverage
Apache-2.0
FAQs
Local-space analytics client and React helpers for interaction/event tracking with configurable ingestion endpoints.
The npm package @plasius/analytics receives a total of 195 weekly downloads. As such, @plasius/analytics popularity was classified as not popular.
We found that @plasius/analytics 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
npm confirmed a tooling bug incorrectly marked several one-character packages as security holders and said it was working on a rollback.

Research
/Security News
Newer packages in this compromise use native extensions and .pth loaders to execute JavaScript stealers in developer environments.

Research
Socket found 37 malicious PyPI wheels that abuse Python startup hooks to launch a Bun-powered credential stealer tied to Mini Shai-Hulud/Miasma.