Merge pull request #1512 from thecodingmachine/updatePosthog
FIX: updated posthog client version and fixed a bug with its toolbar
This commit is contained in:
commit
3c9332f9c1
@ -50,7 +50,7 @@
|
||||
"phaser": "^3.54.0",
|
||||
"phaser-animated-tiles": "workadventure/phaser-animated-tiles#da68bbededd605925621dd4f03bd27e69284b254",
|
||||
"phaser3-rex-plugins": "^1.1.42",
|
||||
"posthog-js": "^1.13.12",
|
||||
"posthog-js": "^1.14.1",
|
||||
"queue-typescript": "^1.0.1",
|
||||
"quill": "1.3.6",
|
||||
"quill-delta-to-html": "^0.12.0",
|
||||
|
@ -1,4 +1,6 @@
|
||||
import { POSTHOG_API_KEY, POSTHOG_URL } from "../Enum/EnvironmentVariable";
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
declare let window: any;
|
||||
|
||||
class AnalyticsClient {
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
@ -8,6 +10,8 @@ class AnalyticsClient {
|
||||
if (POSTHOG_API_KEY && POSTHOG_URL) {
|
||||
this.posthogPromise = import("posthog-js").then(({ default: posthog }) => {
|
||||
posthog.init(POSTHOG_API_KEY, { api_host: POSTHOG_URL, disable_cookie: true });
|
||||
//the posthog toolbar need a reference in window to be able to work
|
||||
window.posthog = posthog;
|
||||
return posthog;
|
||||
});
|
||||
} else {
|
||||
|
@ -4494,10 +4494,10 @@ postcss@^8.2.10:
|
||||
nanoid "^3.1.23"
|
||||
source-map "^0.6.1"
|
||||
|
||||
posthog-js@^1.13.12:
|
||||
version "1.13.12"
|
||||
resolved "https://registry.yarnpkg.com/posthog-js/-/posthog-js-1.13.12.tgz#b54efcb92de43724c889048135ccaae3dc4b874c"
|
||||
integrity sha512-MU1I0zSVhdCcnWI8jAZLtbNJmjfg9AnhUDq5dUzNkb0qPXtNz17BekalnNwDMKs0Zlek3UCOVsIpyc85M+VRNA==
|
||||
posthog-js@^1.14.1:
|
||||
version "1.14.1"
|
||||
resolved "https://registry.yarnpkg.com/posthog-js/-/posthog-js-1.14.1.tgz#68553b9074c686784b994b3f433ad035b241deaa"
|
||||
integrity sha512-gVFk6fsTxG9T+5oqZghffYovENSrs05v3hQMiRQENtGlsHGpt1fnoQ52En8Vg5brMxqLv1XZO4lMgm12/ubH0Q==
|
||||
dependencies:
|
||||
"@sentry/types" "^6.11.0"
|
||||
fflate "^0.4.1"
|
||||
|
Loading…
Reference in New Issue
Block a user