
Security News
NVD Concedes Inability to Keep Pace with Surging CVE Disclosures in 2025
Security experts warn that recent classification changes obscure the true scope of the NVD backlog as CVE volume hits all-time highs.
@cmpsr/analytics
Advanced tools
To be analytic provider agnostic while mirroring itself into the React ecosystem. Since Segment is also trying to do the same thing, their API makes sense as a good base.
React app is wrapped in <AnalyticsProvider>
which passes context
down with functions to track user activities. When these functions are called, it will loop through all valid analytics providers and call their equivalent api.
identify: Let the provider know who the logged in user is group: If there are multiple portals, this helps separate them. This is advanced. page: Track a new page, can be added to Next's router track: Track an even such as a button click user: Returns the auto assigned id reset: Clear the identity
More information can be found on Segment
To compile this library please run npm run libbuild
Wrap the root of your React app in <AnalyticsProvider><YOUR APP /></AnalyticsProvider>
.
Here are the props you can pass in to enable these providers.
export interface IAnalyticsProvider {
segment?: ISegmentConfig;
gtag?: IGTagConfig;
ga?: IGAConfig;
}
import useAnalytics from 'useAnalytics';
const { track } = useAnalytics();
track('Hello World');
Add tests
FAQs
## Philosophy
The npm package @cmpsr/analytics receives a total of 86 weekly downloads. As such, @cmpsr/analytics popularity was classified as not popular.
We found that @cmpsr/analytics demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 3 open source maintainers 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
Security experts warn that recent classification changes obscure the true scope of the NVD backlog as CVE volume hits all-time highs.
Security Fundamentals
Attackers use obfuscation to hide malware in open source packages. Learn how to spot these techniques across npm, PyPI, Maven, and more.
Security News
Join Socket for exclusive networking events, rooftop gatherings, and one-on-one meetings during BSidesSF and RSA 2025 in San Francisco.