feat: add consent-based GA4 analytics
Publish GitHub Pages output / publish (push) Successful in 41s

This commit is contained in:
2026-08-31 14:42:59 +09:00
parent b48a3b4f9d
commit f5d9bef547
12 changed files with 256 additions and 1 deletions
+3
View File
@@ -1,5 +1,6 @@
<script lang="ts">
import { onMount } from 'svelte';
import AnalyticsConsent from '../src/lib/components/AnalyticsConsent.svelte';
import HomePage from '../src/routes/+page.svelte';
import CardsPage from '../src/routes/cards/+page.svelte';
import AnalysisPage from '../src/routes/analysis/+page.svelte';
@@ -108,6 +109,8 @@
<svelte:component this={CurrentPage} />
<AnalyticsConsent pagePath={currentPath} />
<style>
:global(*) { box-sizing: border-box; }
:global(body) { margin: 0; background: #101319; color: #e8ebf1; font-family: Pretendard, "Noto Sans KR", sans-serif; }
+9
View File
@@ -0,0 +1,9 @@
import type { AnalyticsClient } from '../src/lib/analytics/types.ts';
export const analytics: AnalyticsClient = {
available: false,
readConsent: () => null,
grantConsent: () => {},
denyConsent: () => {},
trackPageView: () => {}
};