Skip to content

Commit

Permalink
update env name
Browse files Browse the repository at this point in the history
  • Loading branch information
codenamejason committed May 2, 2024
1 parent 32bfed0 commit 4341195
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
4 changes: 2 additions & 2 deletions packages/grant-explorer/.env.example
Original file line number Diff line number Diff line change
Expand Up @@ -72,5 +72,5 @@ REACT_APP_PASSPORT_API_COMMUNITY_ID_AVALANCHE="0000"
REACT_APP_OSO_API_KEY=

# https://posthog.com/docs/libraries/react
REACT_APP_PUBLIC_POSTHOG_KEY="<ph_project_api_key>"
REACT_APP_PUBLIC_POSTHOG_HOST="<ph_client_api_host>"
REACT_APP_POSTHOG_KEY="<ph_project_api_key>"
REACT_APP_POSTHOG_HOST="<ph_client_api_host>"
9 changes: 3 additions & 6 deletions packages/grant-explorer/src/posthog.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,9 @@ import posthog from "posthog-js";

export const initPosthog = () => {
console.log("Initializing Posthog");
if (
process.env.REACT_APP_PUBLIC_POSTHOG_KEY &&
process.env.REACT_APP_PUBLIC_POSTHOG_HOST
) {
posthog.init(process.env.REACT_APP_PUBLIC_POSTHOG_KEY, {
api_host: process.env.REACT_APP_PUBLIC_POSTHOG_HOST,
if (process.env.REACT_APP_POSTHOG_KEY && process.env.REACT_APP_POSTHOG_HOST) {
posthog.init(process.env.REACT_APP_POSTHOG_KEY, {
api_host: process.env.REACT_APP_POSTHOG_HOST,
session_recording: {
maskTextSelector: '[data-testid="rk-account-button"]',
},
Expand Down

0 comments on commit 4341195

Please sign in to comment.