Skip to content

Commit

Permalink
Removing Posthog
Browse files Browse the repository at this point in the history
  • Loading branch information
FalkWolsky committed Sep 14, 2024
1 parent c52e80c commit 7eeb80c
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 38 deletions.
1 change: 0 additions & 1 deletion client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@
"chalk": "4",
"flag-icons": "^7.2.1",
"number-precision": "^1.6.0",
"posthog-js": "^1.155.4",
"react-countup": "^6.5.3",
"react-player": "^2.11.0",
"resize-observer-polyfill": "^1.5.1",
Expand Down
8 changes: 4 additions & 4 deletions client/packages/lowcoder/src/app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ import { SystemWarning } from "./components/SystemWarning";
import { getBrandingConfig } from "./redux/selectors/configSelectors";
import { buildMaterialPreviewURL } from "./util/materialUtils";
import GlobalInstances from 'components/GlobalInstances';
import posthog from 'posthog-js'
// import posthog from 'posthog-js'
import { fetchHomeData } from "./redux/reduxActions/applicationActions";

const LazyUserAuthComp = React.lazy(() => import("pages/userAuth"));
Expand Down Expand Up @@ -122,9 +122,9 @@ class AppIndex extends React.Component<AppIndexProps, any> {
const isLowCoderDomain = window.location.hostname === 'app.lowcoder.cloud';
const isLocalhost = window.location.hostname === 'localhost';

if (isLocalhost || isLowCoderDomain) {
/* if (isLocalhost || isLowCoderDomain) {
posthog.init('phc_lD36OXeppUehLgI33YFhioTpXqThZ5QqR8IWeKvXP7f', { api_host: 'https://eu.i.posthog.com', person_profiles: 'always' });
}
} */

// make sure all users in this app have checked login info
if (!this.props.isFetchUserFinished || (this.props.currentUserId && !this.props.fetchHomeDataFinished)) {
Expand All @@ -135,7 +135,7 @@ class AppIndex extends React.Component<AppIndexProps, any> {
// if the user just logged in, we send the event to posthog
if (isLocalhost || isLowCoderDomain) {
if (sessionStorage.getItem('_just_logged_in_')) {
posthog.identify(this.props.currentUserId);
// posthog.identify(this.props.currentUserId);
sessionStorage.removeItem('_just_logged_in_');
}
}
Expand Down
33 changes: 0 additions & 33 deletions client/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -10387,13 +10387,6 @@ coolshapes-react@lowcoder-org/coolshapes-react:
languageName: node
linkType: hard

"fflate@npm:^0.4.8":
version: 0.4.8
resolution: "fflate@npm:0.4.8"
checksum: 29d8cbe44d5e7f53e7f5a160ac7f9cc025480c7b3bfd85c5f898cbe20dfa2dad4732daa534982664bf30b35896a90af44ea33ede5d94c5ffd1b8b0c0a0a56ca2
languageName: node
linkType: hard

"file-entry-cache@npm:^6.0.1":
version: 6.0.1
resolution: "file-entry-cache@npm:6.0.1"
Expand Down Expand Up @@ -13822,7 +13815,6 @@ coolshapes-react@lowcoder-org/coolshapes-react:
lowcoder-cli: "workspace:^"
mq-polyfill: ^1.1.8
number-precision: ^1.6.0
posthog-js: ^1.155.4
prettier: ^3.1.0
react-countup: ^6.5.3
react-player: ^2.11.0
Expand Down Expand Up @@ -16126,24 +16118,6 @@ coolshapes-react@lowcoder-org/coolshapes-react:
languageName: node
linkType: hard

"posthog-js@npm:^1.155.4":
version: 1.155.4
resolution: "posthog-js@npm:1.155.4"
dependencies:
fflate: ^0.4.8
preact: ^10.19.3
web-vitals: ^4.0.1
checksum: 749d180a4bfda0cb89307bad81eb230523c3e8f03dc94ac35dde212a130593a23dd98768bbff64753931dc501bca345397d7b39157dcc6eb174d57bd647c33d5
languageName: node
linkType: hard

"preact@npm:^10.19.3":
version: 10.22.1
resolution: "preact@npm:10.22.1"
checksum: 8762645766b1c057eaf9a58ff904b6659ffa7a7d33eb94dc2b96ff1ba08743855c3ade913dfbe9e8da994777aa9f4f5e9f23d39886340f23eaebcd98f5e107e5
languageName: node
linkType: hard

"preact@npm:~10.12.1":
version: 10.12.1
resolution: "preact@npm:10.12.1"
Expand Down Expand Up @@ -21237,13 +21211,6 @@ coolshapes-react@lowcoder-org/coolshapes-react:
languageName: node
linkType: hard

"web-vitals@npm:^4.0.1":
version: 4.2.1
resolution: "web-vitals@npm:4.2.1"
checksum: 556989af90814c6a88eaeea57f778414b26e39d8857173a03e240f62e9cf732090acc97fba38f34f760bde086fef5ee90969920ff1ab3a185518176723589cb8
languageName: node
linkType: hard

"web-worker@npm:^1.2.0":
version: 1.3.0
resolution: "web-worker@npm:1.3.0"
Expand Down

0 comments on commit 7eeb80c

Please sign in to comment.