Skip to content

Commit c5ecdbe

Browse files
committed
Add Umami analytics to the site
GitHub Pages cannot reverse-proxy the script under this origin, so it loads directly from analytics.codeuctivity.cloud.
1 parent e589c52 commit c5ecdbe

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

‎docusaurus.config.ts‎

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,18 @@ const config: Config = {
3434
locales: ['en'],
3535
},
3636

37+
// Self-hosted, cookieless Umami analytics. GitHub Pages cannot reverse-proxy the
38+
// script under this origin the way the nginx-served apps do, so it loads directly.
39+
// data-domains keeps local dev and the github.io mirror out of the stats.
40+
scripts: [
41+
{
42+
src: 'https://analytics.codeuctivity.cloud/script.js',
43+
defer: true,
44+
'data-website-id': 'dc19b213-947c-477b-8eb5-4a5816542c18',
45+
'data-domains': 'codeuctivity.cloud',
46+
},
47+
],
48+
3749
presets: [
3850
[
3951
'classic',

0 commit comments

Comments
 (0)