feat(automations): enhance tracking for automation lifecycle events

- Added tracking for automation creation, updates, deletions, and trigger modifications, including success and failure events.
- Implemented event tracking in the automation creation process, including chat approval and rejection scenarios.
- Updated the instrumentation client to ensure correct typing for PostHog integration.
- Refactored existing mutation atoms to include tracking calls for automation-related actions, improving analytics capabilities.
This commit is contained in:
DESKTOP-RTLN3BA\$punk 2026-05-30 01:13:21 -07:00
parent b1b51ada89
commit 92b1d7a9f7
4 changed files with 316 additions and 14 deletions

View file

@ -88,9 +88,12 @@ async function initPostHog() {
}
return event;
},
loaded: (ph) => {
loaded: () => {
if (typeof window !== "undefined") {
window.posthog = ph;
// `loaded` hands back a `PostHogInterface`, but it's the same
// singleton as the default import (typed `PostHog`); use that to
// keep `window.posthog` correctly typed.
window.posthog = posthog;
}
},
});