Security News
Node.js EOL Versions CVE Dubbed the "Worst CVE of the Year" by Security Experts
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
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 353 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
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
Security News
cURL and Go security teams are publicly rejecting CVSS as flawed for assessing vulnerabilities and are calling for more accurate, context-aware approaches.
Security News
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.