feat: add Google Analytics tracking code
- Include gtag.js for Google Analytics - Setup dataLayer for tracking events - Configure Google Analytics with unique ID This commit integrates Google Analytics into the web application to enable tracking of user interactions and site usage. It sets up the necessary scripts and initializes the tracking code with the provided unique ID, improving analytics capabilities.
This commit is contained in:
parent
f477f205ab
commit
80a75d3fbb
@ -34,6 +34,17 @@
|
||||
<%= javascript_include_tag "application", "data-turbo-track": "reload", type: "module" %>
|
||||
<%= stylesheet_link_tag "application", "data-turbo-track": "reload" %>
|
||||
<script defer data-domain="todayaiweather.com" src="https://plausible.frytea.com/js/script.js"></script>
|
||||
|
||||
<!-- Google tag (gtag.js) -->
|
||||
<script async src="https://www.googletagmanager.com/gtag/js?id=G-PX1C92V5L7"></script>
|
||||
<script>
|
||||
window.dataLayer = window.dataLayer || [];
|
||||
function gtag(){dataLayer.push(arguments);}
|
||||
gtag('js', new Date());
|
||||
|
||||
gtag('config', 'G-PX1C92V5L7');
|
||||
</script>
|
||||
|
||||
</head>
|
||||
|
||||
<body class="min-h-screen bg-base-100 font-sans">
|
||||
|
Loading…
Reference in New Issue
Block a user