Use @convertmax/react when you want React-specific bindings on top of the base JavaScript SDK.
Install the packages
Install the React package together with the base SDK:
npm install @convertmax/react @convertmax/js
Wrap your app
Configure the provider with the Convertmax event endpoint:
import { ConvertMaxProvider, useConvertmax } from "@convertmax/react";
function SignupButton() {
const convertmax = useConvertmax();
return (
<button
onClick={() =>
void convertmax.track("click", {
target: "hero_cta",
page: "https://example.com/pricing"
})
}
>
Start free
</button>
);
}
export function App() {
return (
<ConvertMaxProvider
options={{
host: "https://event.convertmax.io",
apiKey: "YOUR_API_KEY",
autoPage: true
}}
>
<SignupButton />
</ConvertMaxProvider>
);
}
Available React helpers
The package includes these React-focused exports:
ConvertMaxProviderorConvertmaxProvideruseConvertmax()usePageTracking(name?, properties?)
Send baseline events
After the provider is mounted, track at least a page view and one conversion path event:
import { useConvertmax } from "@convertmax/react";
function Example() {
const convertmax = useConvertmax();
return (
<button
onClick={() => void convertmax.track("page_view", {})}
>
Track page view
</button>
);
}
Verify the install
After loading your React app:
- confirm the provider initializes successfully
- confirm a
page_viewevent is emitted - trigger one tracked event such as
click,add_cart, orconvert - confirm requests are sent to
https://event.convertmax.io
Use the Convertmax Chrome Extension to inspect runtime signals and captured requests.