1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-08-23 13:46:45 +02:00

Add frontend hubspot tracker

... but we probably want it to be on the back end. Oh, well.
This commit is contained in:
Thomas Heartman 2025-07-09 10:27:43 +02:00
parent e27bd74dcc
commit ed5e74dc07

View File

@ -0,0 +1,25 @@
type FlagEnabledEvent = {
email: string;
client_id: string;
date: Date;
project: string;
environment_type: string;
};
type SdkConnectedEvent = {
client_id: string;
date: Date;
// the same thing we report via the unleash-sdk header, e.g. unleash-client-js:1.0.0
sdk: string;
app_name: string;
};
type HubSpotEvent = FlagEnabledEvent | SdkConnectedEvent;
export const useHubSpotTracker = () => {
const trackEvent = (event: HubSpotEvent) => {
// todo: implement
};
return { trackEvent };
};