Skip to content

Commit

Permalink
forgot that I self host plausible
Browse files Browse the repository at this point in the history
  • Loading branch information
d-ivashchuk committed Apr 4, 2024
1 parent 4653d15 commit 5e73d90
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/components/providers/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,12 @@ const Providers = ({ children }: { children: React.ReactNode }) => {
>
<TRPCReactProvider>
<SessionProvider>
<PlausibleProvider domain="cascade.stackonfire.com">
<PlausibleProvider
scriptProps={{
src: env.NEXT_PUBLIC_PLAUSIBLE_SELFHOSTED_URL,
}}
domain={env.NEXT_PUBLIC_DEPLOYMENT_URL.replace("https://", "")}
>
<PostHogProvider client={posthog}>
<TooltipProvider>
<Identification>{children}</Identification>
Expand Down
3 changes: 3 additions & 0 deletions src/env.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ export const env = createEnv({
? z.string()
: z.string().optional(),
NEXT_PUBLIC_DEPLOYMENT_URL: z.string(),
NEXT_PUBLIC_PLAUSIBLE_SELFHOSTED_URL: z.string().optional(),
},

/**
Expand All @@ -98,6 +99,8 @@ export const env = createEnv({
LEMON_SQUEEZY_WEBHOOK_SECRET: process.env.LEMON_SQUEEZY_WEBHOOK_SECRET,
LEMON_SQUEEZY_WEBHOOK_URL: process.env.LEMON_SQUEEZY_WEBHOOK_URL,
NEXT_PUBLIC_DEPLOYMENT_URL: process.env.NEXT_PUBLIC_DEPLOYMENT_URL,
NEXT_PUBLIC_PLAUSIBLE_SELFHOSTED_URL:
process.env.NEXT_PUBLIC_PLAUSIBLE_SELFHOSTED_URL,
},
/**
* Run `build` or `dev` with `SKIP_ENV_VALIDATION` to skip env validation. This is especially
Expand Down

0 comments on commit 5e73d90

Please sign in to comment.