Skip to content

Commit

Permalink
Fixes Google Analytics 4 integration
Browse files Browse the repository at this point in the history
Quick fix for Google Analytics 4 integration
  • Loading branch information
effgarces committed Aug 19, 2024
1 parent 9110376 commit 84ec4d7
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tpl/globalfooter.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,12 @@
{if !empty($GoogleAnalyticsTrackingId)}
<!-- Google tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id={$GoogleAnalyticsTrackingId}"></script>
{literal}
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
{/literal}
gtag('config', '{$GoogleAnalyticsTrackingId}');
</script>
{/if}
Expand Down

0 comments on commit 84ec4d7

Please sign in to comment.