🔧Quickstart Guide for React Web Apps
CustomerGlu enables growth teams to run gamified programs in minutes using a low-code builder. This guide will help you integrate the CustomerGlu React SDK into your web application.
Last updated
import { CustomerGluComponent } from "@customerglu/react-web-sdk";
export default function App() {
return (
<div className="App">
<div
id="embedId" // this Id we can setup from dashboard
style={{
width: "100vw",
cursor: "pointer",
}}
>
<CustomerGluComponent
userId="<YOUR-USER-ID>"
gluToken="<USER-GLU_TOKEN>"
region="<REGION>"
>
// <Loader /> you can render your loading component
<CustomerGluComponent />
</div>
</div>
);
}curl --location 'https://events.customerglu.com/server/v4' \
--header 'Content-Type: application/json' \
--header 'X-API-KEY: <YOUR-WRITE-KEY>' \
--data '{
"user_id":"<YOUR-USER-ID>",
"event_name":"<YOUR-EVENT-NAME>",
"event_properties":{
"<KEY-1>": <VALUE-1>
}
}'