Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 44ffbd1

Browse files
committed
添加 Google Analytics 跟踪代码
1 parent 0516d69 commit 44ffbd1

File tree

2 files changed

+25
-0
lines changed

2 files changed

+25
-0
lines changed

‎build.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,16 @@ def render_html(commands):
6363
<link rel="preconnect" href="https://fonts.googleapis.com">
6464
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
6565
<link href="https://fonts.googleapis.com/css2?family=IBM+Plex+Mono&family=Parkinsans:wght@300..800&display=swap" rel="stylesheet">
66+
<!-- Google tag (gtag.js) -->
67+
<script async src="https://www.googletagmanager.com/gtag/js?id=G-ZFCX52ZJTZ"></script>
68+
<script>
69+
window.dataLayer = window.dataLayer || [];
70+
function gtag(){{dataLayer.push(arguments);}}
71+
gtag('js', new Date());
72+
73+
gtag('config', 'G-ZFCX52ZJTZ');
74+
</script>
75+
6676
<style>
6777
:root {{
6878
--theme-color: #2E7EEE;

‎index.html

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,21 @@
5555
href="https://fonts.googleapis.com/css2?family=IBM+Plex+Mono&family=Parkinsans:wght@300..800&display=swap"
5656
rel="stylesheet"
5757
/>
58+
<!-- Google tag (gtag.js) -->
59+
<script
60+
async
61+
src="https://www.googletagmanager.com/gtag/js?id=G-ZFCX52ZJTZ"
62+
></script>
63+
<script>
64+
window.dataLayer = window.dataLayer || [];
65+
function gtag() {
66+
dataLayer.push(arguments);
67+
}
68+
gtag("js", new Date());
69+
70+
gtag("config", "G-ZFCX52ZJTZ");
71+
</script>
72+
5873
<style>
5974
:root {
6075
--theme-color: #2e7eee;

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /