posthog integration (cloud) (#1304)

This commit is contained in:
Philip Okugbe
2025-06-27 10:58:36 +01:00
committed by GitHub
parent e44c170873
commit 9f144d35fb
10 changed files with 134 additions and 4 deletions

View File

@ -83,6 +83,18 @@ export function getBillingTrialDays() {
return getConfigValue("BILLING_TRIAL_DAYS");
}
export function getPostHogHost() {
return getConfigValue("POSTHOG_HOST");
}
export function isPostHogEnabled(): boolean {
return Boolean(getPostHogHost() && getPostHogKey());
}
export function getPostHogKey() {
return getConfigValue("POSTHOG_KEY");
}
function getConfigValue(key: string, defaultValue: string = undefined): string {
const rawValue = import.meta.env.DEV
? process?.env?.[key]