
Security News
Risky Biz Podcast: Making Reachability Analysis Work in Real-World Codebases
This episode explores the hard problem of reachability analysis, from static analysis limits to handling dynamic languages and massive dependency trees.
next-use-posthog
Advanced tools
We now offer a PostHog provider and hooks which makes setup easier and more reliable.
We recommend using the approach outlined in our documentation
In v2.0.0 we moved PostHog to be a peer dependency so you can control which version of PostHog you use without needing changes to this integration.
yarn add next-use-posthog
In pages/_app.js
or pages/_app.tsx
import { usePostHog } from "next-use-posthog";
const App = ({ Component, pageProps }) => {
usePostHog("API_KEY", {
api_host: "https://app.posthog.com",
});
return <Component {...pageProps} />;
};
export default App;
import { usePostHog } from "next-use-posthog";
import { AppProps } from "next/app";
import { FC } from "react";
const App: FC<AppProps> = ({ Component, pageProps }) => {
usePostHog("API_KEY", {
api_host: "https://app.posthog.com",
});
return <Component {...pageProps} />;
};
export default App;
import { usePostHog } from "next-use-posthog";
import { AppProps } from "next/app";
import { FC } from "react";
const App: FC<AppProps> = ({ Component, pageProps }) => {
usePostHog("API_KEY", {
api_host: "https://app.posthog.com",
loaded: (posthog) => {
if (process.env.NODE_ENV === "development") posthog.opt_out_capturing();
},
});
return <Component {...pageProps} />;
};
export default App;
FAQs
A Next.js hook for PostHog analytics
The npm package next-use-posthog receives a total of 345 weekly downloads. As such, next-use-posthog popularity was classified as not popular.
We found that next-use-posthog demonstrated a not healthy version release cadence and project activity because the last version was released 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
This episode explores the hard problem of reachability analysis, from static analysis limits to handling dynamic languages and massive dependency trees.
Security News
/Research
Malicious Nx npm versions stole secrets and wallet info using AI CLI tools; Socket’s AI scanner detected the supply chain attack and flagged the malware.
Security News
CISA’s 2025 draft SBOM guidance adds new fields like hashes, licenses, and tool metadata to make software inventories more actionable.