Skip to content

Commit

Permalink
Merge pull request #62 from keitaroinc/google-snippets
Browse files Browse the repository at this point in the history
Change the google analytics script
  • Loading branch information
blagojabozinovski authored Dec 4, 2024
2 parents 090da8d + f002bd0 commit a726644
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions ckanext/alisea/templates/snippets/gtm.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
<!-- Google Tag Manager -->
<script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
})(window,document,'script','dataLayer','{{ h.get_google_tag() }}');</script>
<!-- End Google Tag Manager -->
<!-- Google tag (gtag.js) -->
<script async src="https://www.googletagmanager.com/gtag/js?id={{ h.get_google_tag() }}"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', '{{ h.get_google_tag() }}');
</script>

0 comments on commit a726644

Please sign in to comment.