-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0846e82
commit 041413f
Showing
1 changed file
with
16 additions
and
7 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,25 @@ | ||
export const prerender = true; | ||
export const trailingSlash = 'always'; | ||
|
||
import posthog from 'posthog-js' | ||
import "posthog-js/dist/recorder"; | ||
import "posthog-js/dist/surveys"; | ||
// import "posthog-js/dist/exception-autocapture"; | ||
import "posthog-js/dist/tracing-headers"; | ||
import "posthog-js/dist/web-vitals"; | ||
import posthog from 'posthog-js'; | ||
|
||
import { browser } from '$app/environment'; | ||
|
||
export const load = async () => { | ||
|
||
if (browser) { | ||
posthog.init( | ||
'phc_gXl8K7Gu7YCBU5KH6sO8pFy0InNYRWngGdZ4o23KM07', | ||
{ api_host: 'https://us.i.posthog.com' } | ||
) | ||
if (!window.location.host.includes('127.0.0.1') && !window.location.host.includes('localhost')) { | ||
posthog.init('phc_gXl8K7Gu7YCBU5KH6sO8pFy0InNYRWngGdZ4o23KM07', { | ||
api_host: 'https://us.i.posthog.com', | ||
disable_external_dependency_loading: true // Optional - will ensure we never try to load extensions lazily | ||
}); | ||
} | ||
} | ||
return | ||
return; | ||
}; | ||
|
||
export const _frontmatter = {} |