Hugo 使用 Google Analytics
在 Google Analytics 建立 GA4 資源,取得
G-開頭的 Measurement ID。本專案的 NexT 主題覆寫模板讀取
params.analytics.google,在config.yaml設定:params: analytics: google: G-MEASUREMENT_ID啟動本地伺服器後,使用瀏覽器開發者工具確認
gtag.js已載入。正式環境還應確認隱私權與 Cookie 告知符合部署地區的規範。
冒險者留言
comments powered by Disqus