cookie-consent.ts
Cookie 同意模式、分類和第三方服務。
config/cookie-consent.ts 設定 Cookie 同意方式、提示文案、Cookie 分類和第三方服務。統計服務的 Key 必須與 analytics.ts 一致,廣告服務的 Key 必須與 ads.ts 一致。
共用欄位
必要 Cookie、功能 Cookie、統計服務和廣告服務,都使用下列欄位:
mode
bannerOverlay
policyVersion
configVersion
title
description
範本預設的 value 為:
We use cookies to make this website work, improve your experience, and understand how our site is used. Necessary cookies are always enabled because they are required for security, login, checkout, and basic site functions. You can accept all cookies, reject non-essential cookies, or customize your preferences.
Learn more in our [Cookie Policy](/cookies).categories
necessary
必要 Cookie 直接使用上方的共用欄位。
functionality
items
theme
analytics
items
範本預設列出下列統計服務,全部都是 enabled: true、readOnly: false。使用 prompt 模式時,使用者可以逐項開啟或關閉。某項服務在 analytics.ts 中缺少必要參數時,不會顯示在 Cookie 偏好設定中。
| Key | title.value | description.value |
|---|---|---|
googleAnalytics | Google Analytics | Helps us measure website traffic, page views, user interactions, and conversions so we can improve the website. |
clarity | Microsoft Clarity | Helps us understand how visitors interact with the website through usage insights such as clicks, scrolling, and page behavior. |
cloudflareBeacon | Cloudflare Web Analytics | Provides privacy-friendly website analytics, including page views, traffic sources, performance metrics, and basic visitor insights. |
umami | Umami | Helps us collect privacy-friendly website analytics, such as page views, referrers, devices, and general usage trends. |
plausible | Plausible Analytics | Helps us measure website traffic and usage trends with lightweight, privacy-friendly analytics. |
posthog | PostHog | Helps us understand product usage, feature interactions, funnels, and user journeys so we can improve the product experience. |
seline | Seline | Helps us measure website traffic, visitor behavior, referrers, and usage trends with privacy-focused analytics. |
ahrefs | Ahrefs Web Analytics | Helps us understand website traffic, search performance, referrers, and content effectiveness. |
dataFast | DataFast | Helps us track website traffic, conversions, referrers, and key growth metrics so we can improve our marketing and product decisions. |
openPanel | OpenPanel | Helps us understand website and product usage, including page views, events, funnels, and user interactions. |
marketing
items
googleAdsense
範本預設使用 silent 模式
silent 模式不顯示 Cookie 選擇介面,而是直接載入 analytics.ts 和 ads.ts 中已設定的指令碼,同時忽略各項設定中的 enabled 和 readOnly。網站正式上線前,應依適用地區、使用的服務和隱私權政策,確認是否需要改成 prompt。