We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2d99ed0 commit b88df13Copy full SHA for b88df13
1 file changed
docs/javascripts/analytics.js
@@ -1,6 +1,11 @@
1
-// Google tag (gtag.js)
+// Google tag (gtag.js) - Load the script first
2
+var script = document.createElement('script');
3
+script.async = true;
4
+script.src = 'https://www.googletagmanager.com/gtag/js?id=G-9JKSMSLNJ9';
5
+document.head.appendChild(script);
6
+
7
+// Initialize gtag after script loads
8
window.dataLayer = window.dataLayer || [];
9
function gtag(){dataLayer.push(arguments);}
10
gtag('js', new Date());
-
11
gtag('config', 'G-9JKSMSLNJ9');
0 commit comments