Installation
You can install thereact-edgee
library using npm or yarn.
Usage
Import theEdgeeSdk
component from the react-edgee
library:
When using app
folder structure
Add the EdgeeSdk
component inside the <head>
tag of your RootLayout
component:
<YOUR_SDK_URL>
with the URL provided in the Edgee console, in the project overview section.
When using pages
folder structure
Add the EdgeeSdk
component in your MyApp
component:
<YOUR_SDK_URL>
with the URL provided in the Edgee console, in the project overview section.
When using Vite or other frameworks
Add theEdgeeSdk
component inside the <Router>
component in your App
component:
<YOUR_SDK_URL>
with the URL provided in the Edgee console, in the project overview section.
🔥 Using the React Hook (useEdgeeDataCollection
)
The useEdgeeDataCollection
hook simplifies event tracking by providing direct access to the Edgee Data Collection SDK methods.