Skip to content

Commit f1cb333

Browse files
Update: Google Analytics 및 Google Tag Manager 설정 변경
- Google Analytics 설정 제거 - Google Tag Manager 스크립트 추가 및 noscript 태그 포함 - Google AdSense 정보는 유지됨
1 parent 116cc02 commit f1cb333

File tree

2 files changed

+12
-13
lines changed

2 files changed

+12
-13
lines changed

_config.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,6 @@ paginate_path: "/page:num/"
5858
github_username: realcoding2003
5959
linkedin_username: realcoding
6060

61-
# Google Analytics
62-
google_analytics: G-W3MR94BSXV
63-
6461
# Google AdSense
6562
google_adsense: ca-pub-4992764083187170
6663

_layouts/default.html

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,14 @@
1414
<link rel="icon" type="image/x-icon" href="/assets/images/favicon.ico">
1515
<link rel="apple-touch-icon" sizes="180x180" href="/assets/images/character.svg">
1616
<link rel="manifest" href="/assets/images/site.webmanifest">
17+
18+
<!-- Google Tag Manager -->
19+
<script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
20+
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
21+
j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
22+
'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
23+
})(window,document,'script','dataLayer','GTM-T3KNH95M');</script>
24+
<!-- End Google Tag Manager -->
1725

1826
<!-- Fonts -->
1927
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap" rel="stylesheet">
@@ -50,15 +58,9 @@
5058
<script src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.29.0/plugins/autoloader/prism-autoloader.min.js"></script>
5159
<script src="{{ '/assets/js/main.js' | relative_url }}"></script>
5260

53-
{% if site.google_analytics %}
54-
<!-- Google Analytics -->
55-
<script async src="https://www.googletagmanager.com/gtag/js?id={{ site.google_analytics }}"></script>
56-
<script>
57-
window.dataLayer = window.dataLayer || [];
58-
function gtag(){dataLayer.push(arguments);}
59-
gtag('js', new Date());
60-
gtag('config', '{{ site.google_analytics }}');
61-
</script>
62-
{% endif %}
61+
<!-- Google Tag Manager (noscript) -->
62+
<noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-T3KNH95M"
63+
height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
64+
<!-- End Google Tag Manager (noscript) -->
6365
</body>
6466
</html>

0 commit comments

Comments
 (0)