全局注册

找到项目根目录的index.html

  1. <!-- Global site tag (gtag.js) - Google Analytics -->
  2. <script async src="https://www.googletagmanager.com/gtag/js?id=GA_MEASUREMENT_ID"></script>
  3. <script>
  4. window.dataLayer = window.dataLayer || [];
  5. function gtag(){window.dataLayer.push(arguments);}
  6. gtag('js', new Date());
  7. gtag('config', 'GA_MEASUREMENT_ID');
  8. </script>

谷歌分析

https://analytics.google.com/analytics/web/?_ga=2.51880746.2046205372.1649248453-491233940.1649248453#/p309921530/reports/explorer?params=_u..nav%3Dmaui&r=user-technology-detail&ruid=user-technology-detail,user,technology&collectionId=user