
Product
Introducing Module Reachability: Focus on the Vulnerabilities That Matter
Module Reachability filters out unreachable CVEs so you can focus on vulnerabilities that actually matter to your application.
react-matomo
Advanced tools
npm i -D react-matomo
Or using yarn
:
yarn add react-matomo
Setup the Provider:
import { MatomoProvider, createInstance } from "react-matomo";
<MatomoProvider
value={createInstance({
url: "https://analytics.yoursite.org/",
siteId: 9,
})}
>
<App />
</MatomoProvider>;
Use the hook:
import { useMatomo } from "react-matomo";
const App = () => {
const { trackPageView } = useMatomo();
useEffect(() => {
trackPageView();
}, []);
return <div>Content goes here</div>;
};
Track event
import { useMatomo } from "react-matomo";
const App = () => {
const { trackEvent } = useMatomo();
return (
<div>
<button onClick={() => trackEvent("category", "action")}>Click me</button>
</div>
);
};
trackEvent
trackSiteSearch
trackGoal
trackLink
FAQs
## install
The npm package react-matomo receives a total of 17 weekly downloads. As such, react-matomo popularity was classified as not popular.
We found that react-matomo 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.
Product
Module Reachability filters out unreachable CVEs so you can focus on vulnerabilities that actually matter to your application.
Company News
Socket is bringing best-in-class reachability analysis into the platform — cutting false positives, accelerating triage, and cementing our place as the leader in software supply chain security.
Product
Socket is introducing a new way to organize repositories and apply repository-specific security policies.