-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #87 from Nazi-pikachu/frontend-posthog
Feat : Added frontend telemetry support
- Loading branch information
Showing
10 changed files
with
80 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
const Event = { | ||
SIGNED_OUT:"User Signed Out", | ||
SIGNED_IN :"User Signed In", | ||
SIGNED_UP: "User signed Up", | ||
BULK_LINK_CREATION :"Bulk Links Created", | ||
LINK_CREATION :"Link Created", | ||
} | ||
export default Event; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,36 @@ | ||
import { StrictMode } from "react"; | ||
import * as ReactDOM from "react-dom/client"; | ||
import { BrowserRouter } from "react-router-dom"; | ||
import { PostHogProvider} from 'posthog-js/react' | ||
import posthog from 'posthog-js' | ||
|
||
import "antd/dist/antd.css"; | ||
import "app/styles/main.css"; | ||
import "app/styles/responsive.css"; | ||
|
||
import App from "app/app"; | ||
|
||
const posthogKey = process.env['NX_REACT_APP_PUBLIC_POSTHOG_KEY']; | ||
const posthogHost = process.env['NX_REACT_APP_PUBLIC_POSTHOG_HOST']; | ||
|
||
if (posthogKey && posthogHost) { | ||
posthog.init(posthogKey, { | ||
api_host: posthogHost, | ||
}); | ||
} else { | ||
console.error("Missing PostHog environment variables"); | ||
} | ||
|
||
const root = ReactDOM.createRoot( | ||
document.getElementById("root") as HTMLElement | ||
); | ||
|
||
root.render( | ||
<StrictMode> | ||
<BrowserRouter> | ||
<PostHogProvider client={posthog}> | ||
<App /> | ||
</PostHogProvider> | ||
</BrowserRouter> | ||
</StrictMode> | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters