mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-04 02:26:19 +00:00
fix post hog on app.infisical frontend
This commit is contained in:
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user