feat(analytics): add Google Tag Manager script and gtag.js for tracking

This commit is contained in:
UncleCode
2025-05-16 20:49:02 +08:00
parent 8a5e23d374
commit baca2df8df
2 changed files with 6 additions and 0 deletions

View File

@@ -0,0 +1,5 @@
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'G-58W0K2ZQ25');

View File

@@ -84,6 +84,7 @@ extra_css:
- assets/dmvendor.css - assets/dmvendor.css
extra_javascript: extra_javascript:
- https://www.googletagmanager.com/gtag/js?id=G-58W0K2ZQ25
- assets/highlight.min.js - assets/highlight.min.js
- assets/highlight_init.js - assets/highlight_init.js
- https://buttons.github.io/buttons.js - https://buttons.github.io/buttons.js