Skip to content

Commit

Permalink
fix: load page_view event
Browse files Browse the repository at this point in the history
  • Loading branch information
robsongajunior committed Nov 7, 2024
1 parent a1386a8 commit 1f14d5d
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/components/trd3/google-tag-manager/script.astro
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,23 @@
});
})();
</script>

<script is:inline async type="text/javascript">
(function() {
if (window.location.origin !== 'https://www.azion.com' || window.location.search.match(/trd3=false/)) {
console.log('Google GTAG: disabled');
return;
}

window.dataLayer = window.dataLayer || [];

function gtag(){
dataLayer.push(arguments);
}

gtag('js', new Date());
gtag('config', 'G-LNFV74DS0K');

function load() {
let script = document.createElement('script');
script.async = true;
Expand Down

0 comments on commit 1f14d5d

Please sign in to comment.