Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
@blackbox-vision/next-google-analytics
Advanced tools
:rocket: Integrate Google Analytics in next.js with ease
npm i @blackbox-vision/next-google-analytics
yarn add @blackbox-vision/next-google-analytics
Generate a Google Analytics account if you don't have one.
Get the Google Analytics tracking ID.
Create a .env.local
with following content:
NEXT_PUBLIC_GOOGLE_ANALYTICS=your_tracking_id
app
and add the following contents:import { GoogleAnalytics } from '@blackbox-vision/next-google-analytics';
function MyApp({ Component, pageProps }) {
return (
<>
<GoogleAnalytics id={process.env.NEXT_PUBLIC_GOOGLE_ANALYTICS} />
<Component {...pageProps} />
</>
);
}
export default MyApp
You can track custom events with this API by doing the following:
import { googleAnalytics } from "@blackbox-vision/next-google-analytics";
googleAnalytics.event("my_event", {
my_param: "xyz",
});
We're supporting next.js v11 only for now, but we've a GoogleAnalyticsLegacy
component in the works and intentions to support older versions of next.
FAQs
Integrate Google Analytics in next.js with ease
The npm package @blackbox-vision/next-google-analytics receives a total of 13 weekly downloads. As such, @blackbox-vision/next-google-analytics popularity was classified as not popular.
We found that @blackbox-vision/next-google-analytics demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 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
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.