fix post hog on app.infisical frontend

This commit is contained in:
Maidul Islam
2024-07-06 17:44:53 -04:00
parent d2759ea378
commit 3ba90cc42d
2 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -10,7 +10,7 @@ export const initPostHog = () => {
try { try {
if (typeof window !== "undefined") { if (typeof window !== "undefined") {
// @ts-ignore // @ts-ignore
if (ENV === "production" && TELEMETRY_CAPTURING_ENABLED === "true") { if (ENV === "production" && TELEMETRY_CAPTURING_ENABLED === true) {
posthog.init(POSTHOG_API_KEY, { posthog.init(POSTHOG_API_KEY, {
api_host: POSTHOG_HOST api_host: POSTHOG_HOST
}); });
@@ -13,7 +13,7 @@ class Capturer {
} }
capture(item: string) { capture(item: string) {
if (ENV === "production" && TELEMETRY_CAPTURING_ENABLED === "true") { if (ENV === "production" && TELEMETRY_CAPTURING_ENABLED === true) {
try { try {
this.api.capture(item); this.api.capture(item);
} catch (error) { } catch (error) {
@@ -23,7 +23,7 @@ class Capturer {
} }
identify(id: string, email?: string) { identify(id: string, email?: string) {
if (ENV === "production" && TELEMETRY_CAPTURING_ENABLED === "true") { if (ENV === "production" && TELEMETRY_CAPTURING_ENABLED === true) {
try { try {
this.api.identify(id, { this.api.identify(id, {
email: email email: email