Developer Portal
API Documentation
Everything you need to integrate EngagePro's powerful attribution engine into your web application.
Introduction
The @bluenath/engage SDK is a production-ready analytics module designed for EngagePro attribution and campaign intelligence. It captures web events, enriches intent signals, and sends batched payloads to our ingest servers for campaign-level ROI measurement.
NPM Package
npm install @bluenath/engage
Installation
Install the package via your preferred package manager:
npm install @bluenath/engageInitialization
Wrap your application with the EngageProProvider at the root level.
import { EngageProProvider } from "@bluenath/engage";
// Initialize in your root component (e.g., main.tsx or App.tsx)
ReactDOM.createRoot(document.getElementById("root")!).render(
<EngageProProvider
apiKey="YOUR_PUBLIC_API_KEY"
tracking={{
autoTrack: true,
useCookies: true,
fingerprint: true,
}}
>
<App />
</EngageProProvider>,
);Manual Tracking
Use the useAnalytics hook to track custom business events or conversions.
import { useAnalytics } from "@bluenath/engage";
export function CheckoutComplete() {
const analytics = useAnalytics();
const onPurchase = () => {
analytics.track("PURCHASE", {
orderId: "ORD-7281",
amount: 2499,
currency: "INR",
ref: "camp_<campaignId>_cr_<creatorId>",
});
};
return <button onClick={onPurchase}>Confirm Purchase</button>;
}Pro Tip: For campaign-level attribution, always include the
ref format: camp_<campaignId>_cr_<creatorId>.Configuration
| Field | Type | Required | Description |
|---|---|---|---|
| apiKey | string | Yes | Brand public API key from EngagePro dashboard |
| apiHost | string | No | Local override ONLY for local development (localhost/127.0.0.1) |
| tracking.autoTrack | boolean | Yes | Enable DOM interaction capture (clicks, forms, etc.) |
| tracking.useCookies | boolean | Yes | Persist anonymous identity across sessions |
| tracking.fingerprint | boolean | Yes | Include device fingerprint context for fraud prevention |
| debug | boolean | No | Log payloads in console for integration testing |
Endpoint Policy
To ensure data integrity and security, EngagePro enforces a strict endpoint policy:
- The production ingest endpoint is fixed to our managed backend.
- The
apiHostoverride is ONLY accepted for local development (localhostor127.0.0.1). - Unsupported hosts are automatically rejected and will fall back to the managed production endpoint.
Security & Best Practices
Important Security Notes:
- Never use internal service keys or private keys in your frontend application.
- If your public
apiKeyis leaked, rotate it immediately from the EngagePro dashboard. - Avoid sending raw Personally Identifiable Information (PII) inside custom properties. Use anonymous identifiers where possible.