Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
nextjs-edgee
Advanced tools
EdgeeSdk
is a React component that injects the Edgee SDK script into the application.
It also sets up listeners to track page navigations via history.pushState
and history.replaceState
to automatically call the edgee.page
method, ensuring page views are tracked during SPA navigations.
using npm:
npm install nextjs-edgee
using yarn:
yarn add nextjs-edgee
import using:
import EdgeeSdk from 'nextjs-edgee';
app/layout.js
for app
folder structureFor rendering add <EdgeeSdk />
to your return()
inside the <body></body>
of RootLayout()
:
import EdgeeSdk from "nextjs-edgee";
export default function RootLayout({ children }) {
return (
<html lang="en">
<body>
{children}
<EdgeeSdk src={"https://yourdomain.com/_edgee/sdk.js"} />
</body>
</html>
);
}
pages/_app.js
for pages
folder structureFor rendering add <EdgeeSdk />
to your return()
in MyApp()
:
import EdgeeSdk from 'nextjs-edgee';
export default function MyApp({ Component, pageProps }) {
return (
<>
<Component {...pageProps} />
<EdgeeSdk src="https://yourdomain.com/_edgee/sdk.js" />
</>
);
}
For rendering add <EdgeeSdk />
to your return()
inside the component in App()
in your App.js:
import EdgeeSdk from 'nextjsedgee';
const App = () => {
return (
<div>
<Router>
<EdgeeSdk src="https://yourdomain.com/_edgee/sdk.js" />
<Routes>
{/* Your Routes Here */}
</Routes>
</Router>
</div>
)
}
export default App;
import using:
import { EdgeeSdk, EdgeeContextPayload, EdgeeContextObject } from "nextjs-edgee";
app/layout.js
for app
folder structureimport { EdgeeSdk, EdgeeContextPayload, EdgeeContextObject } from "nextjs-edgee";
export default function RootLayout({ children }) {
const edgeeContextPayload: EdgeeContextObject = {
page: {
name: "With Edgee",
category: "demo",
title: "With Edgee",
url: "https://mysite.com/my/path",
path: "/my/path",
search: "?ok",
keywords: ["demo", "edgee"],
properties: {
section: "edge computing",
order: 6
}
},
identify: {
userId: "12345",
anonymousId: "12345",
properties: {
email: "me@example.com",
name: "John Doe",
age: 32
}
},
destinations: {
all: true,
google_analytics: true,
amplitude: true,
facebook_capi: true
}
};
return (
<html lang="en">
<body>
{children}
<EdgeeSdk src={"https://yourdomain.com/_edgee/sdk.js"} />
</body>
</html>
);
}
To know more about the Edgee SDK, visit the Edgee SDK documentation.
FAQs
The Edgee SDK for React applications
The npm package nextjs-edgee receives a total of 0 weekly downloads. As such, nextjs-edgee popularity was classified as not popular.
We found that nextjs-edgee demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 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.
Research
Security News
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.