Skip to content

Commit e5fcf5b

Browse files
authored
Merge pull request #508 from EducationalTools/505-use-proxy-for-posthog
use a reverse proxy for posthog analytics
2 parents ef07527 + b1f1860 commit e5fcf5b

2 files changed

Lines changed: 11 additions & 4 deletions

File tree

src/lib/analytics.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ export function initializeAnalytics() {
88
if (!browser) return;
99

1010
posthog.init('phc_jg4gOdigfHQD4MSgrSaO883dp2LjNJbJO7azv61UtI0', {
11-
api_host: 'https://us.i.posthog.com',
11+
api_host: 'https://hog.edutools.ingo.au',
1212
person_profiles: 'always',
1313
capture_exceptions: true
1414
});
@@ -18,7 +18,7 @@ export async function checkTrackerBlocked(): Promise<boolean> {
1818
if (!browser) return false;
1919

2020
try {
21-
await fetch('https://us-assets.i.posthog.com/static/exception-autocapture.js');
21+
await fetch('https://hog.edutools.ingo.au/static/exception-autocapture.js');
2222
return false;
2323
} catch {
2424
return navigator.onLine;

src/lib/components/tracker-dialog.svelte

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,17 @@
1212
<Dialog.Title>Notice</Dialog.Title>
1313
<Dialog.Description>
1414
We use PostHog to detect/fix errors, track usage and roll out features. Please disable your
15-
tracker/ad blocker to allow this. Don't worry, we won't show you any ads.
16-
<br /><br />
15+
tracker/ad blocker for this site to allow this. Don't worry, we won't show you any ads.
16+
<br />
17+
<br />
1718
For more details about our data collection practices, see our
1819
<a href="/privacy" class="text-blue-600 hover:underline" target="_blank">Privacy Policy</a>.
20+
<br />
21+
<br />
22+
<details>
23+
<summary>Techinal info</summary>
24+
<p>We detected that hog.edutools.ingo.au is blocked by your ad/tracker blocker</p>
25+
</details>
1926
</Dialog.Description>
2027
<Dialog.Footer>
2128
<Dialog.Close onclick={() => ($trackerDialogClosed = true)}>

0 commit comments

Comments
 (0)