Skip to content

Commit

Permalink
Merge pull request #102 from takumi0213/master
Browse files Browse the repository at this point in the history
add gtm tag
  • Loading branch information
takumi0213 authored Jul 3, 2024
2 parents 77637f5 + 72a1e3b commit ddcb843
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 0 deletions.
4 changes: 4 additions & 0 deletions _includes/gtm-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-NTDBT2C4"
height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
<!-- End Google Tag Manager (noscript) -->
7 changes: 7 additions & 0 deletions _includes/gtm-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-NTDBT2C4');</script>
<!-- End Google Tag Manager -->
2 changes: 2 additions & 0 deletions _layouts/default.html
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
<script src="{{ "/assets/js/highlight.js" }}"></script>
<script>hljs.initHighlightingOnLoad();</script>
<script src="https://status.sina-chan.com/embed/script.js"></script>
{% include gtm-head.html %}
<!-- Google tag (gtag.js) -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-8RSX5H7RM1"></script>
<script>
Expand Down Expand Up @@ -63,6 +64,7 @@
</head>
<body>
{% include notice.html %}
{% include gtm-body.html %}
{% include header.html %}
<div class="content">
{{content}}
Expand Down

0 comments on commit ddcb843

Please sign in to comment.