Update Google Analytics to GA4

在官网找到 Google Analytics 4 Property Setup Assistant, 点击确认后出现 You have successfully connected your properties.

Learn more about Google Analytics 4 properties

Hugo 后台告警

WARN  Google Analytics 4 (GA4) replaced Google Universal Analytics (UA) effective 1 July 2023. See https://support.google.com/analytics/answer/11583528. Create a GA4 property and data stream, then replace the Google Analytics ID in your site configuration with the new value.

修改 hugo.yml

googleAnalytics: 88888888

生效后,页面中加入了

<script async src="https://www.googletagmanager.com/gtag/js?id=88888888"></script>
Last updated on 2024-06-04 18:30
Built with Hugo