Skip to content

Commit ba393d7

Browse files
committed
GTM
1 parent e9c6c0e commit ba393d7

File tree

1 file changed

+16
-4
lines changed

1 file changed

+16
-4
lines changed

_layouts/base.html

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
<!DOCTYPE html>
2-
<html lang="en">
2+
<html lang="zh-Hans">
33

44
<head>
55
<meta charset="utf-8" />
66
<title>{{ site.title }} - {{ page.title | escape }}</title>
77
{% if jekyll.environment == 'stage' %}
88
<meta name="robots" content="noindex" />
99
{% endif %}
10-
<meta name="author" content="Apple Inc." />
10+
<meta name="author" content="SwiftGG" />
1111
<meta name="viewport" content="width=device-width initial-scale=1" />
1212
{% if page.excerpt %}
1313
<meta name="description" content="{{ page.excerpt | strip_html | escape }}">
@@ -29,12 +29,20 @@
2929
<link rel="alternate" type="application/atom+xml" title="Swift.org (Atom Feed)" href="/atom.xml" />
3030
{% endif %}
3131

32+
<!-- Google Tag Manager -->
33+
<script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
34+
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
35+
j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
36+
'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
37+
})(window,document,'script','dataLayer','GTM-K5J4Q9FN');</script>
38+
<!-- End Google Tag Manager -->
39+
3240
{% if page.url %}
3341
<link rel="canonical" href="{{ site.url }}{{ page.url }}" />
3442
{% endif %}
3543

3644
<meta name="twitter:card" content="summary" />
37-
<meta name="twitter:site" content="@SwiftLang" />
45+
<meta name="twitter:site" content="@SwiftGG" />
3846
{% if page.id %}
3947
<meta name="twitter:title" content="{{ page.title | escape }}" />
4048
<meta name="twitter:description" content="{{ page.excerpt | strip_html | escape }}" />
@@ -63,10 +71,14 @@
6371
</head>
6472

6573
<body>
74+
<!-- Google Tag Manager (noscript) -->
75+
<noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-K5J4Q9FN"
76+
height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
77+
<!-- End Google Tag Manager (noscript) -->
6678
{% if jekyll.environment == 'stage' %}
6779
<p class="stage">
6880
⚠️ STAGING WEBSITE ⚠️<br>
69-
Visit <a href="https://www.swift.org">swift.org</a> for production website.
81+
Visit <a href="https://swift.swiftgg.team">swift.swiftgg.team</a> for production website.
7082
</a>
7183
</p>
7284
{% endif %}

0 commit comments

Comments
 (0)