Skip to content

Commit

Permalink
Merge pull request #179 from podaac/add-google-tag-manager-code
Browse files Browse the repository at this point in the history
Add google tag manager code
  • Loading branch information
cassienickles committed Jan 22, 2024
2 parents 334c34e + dfdd970 commit 913e847
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 0 deletions.
2 changes: 2 additions & 0 deletions _quarto.yml
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,8 @@ website:

format:
html:
include-in-header: gtm_code_head.html
include-before-body: gtm_code_body.html
theme:
light: cosmo # from https://quarto.org/docs/output-formats/html-themes.html
dark: darkly
Expand Down
4 changes: 4 additions & 0 deletions gtm_code_body.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<!-- Google Tag Manager (noscript) -->
<noscript><iframe src=https://www.googletagmanager.com/ns.html?id=GTM-WNP7MLF
height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
<!-- End Google Tag Manager (noscript) -->
7 changes: 7 additions & 0 deletions gtm_code_head.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<!-- 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','GTM-WNP7MLF');</script>
<!-- End Google Tag Manager -->

0 comments on commit 913e847

Please sign in to comment.