File tree 2 files changed +23
-0
lines changed
2 files changed +23
-0
lines changed Original file line number Diff line number Diff line change @@ -258,6 +258,21 @@ web_analytics: # 网页访问统计
258
258
google :
259
259
measurement_id :
260
260
261
+ # Umami Analytics,src 和 data-website-id 是必填项,其他可选
262
+ # Umami Analytics, src and data-website-id are required, others are optional
263
+ umami :
264
+ # umami js 文件地址,需要在 umami 后台创建站点后获取
265
+ # umami js file url, get after create website in umami
266
+ src :
267
+ # umami 的 website id,需要在 umami 后台创建站点后获取
268
+ # umami website id, get after create website in umami
269
+ data_website_id :
270
+ # 如果你只想跟踪器跟踪特定的域名,你可以将它们添加到你的跟踪器脚本中。这是一个逗号分隔的域名列表。
271
+ # 如果你在一个分阶段、开发的环境中工作,这会很有帮助。避免统计 localhost。
272
+ # If you want the tracker to only run on specific domains, you can add them to your tracker script. This is a comma delimited list of domain names.
273
+ # Helps if you are working in a staging/development environment. Avoids tracking localhost.
274
+ data_domains :
275
+
261
276
# 腾讯统计的 H5 App ID,开启高级功能才有cid
262
277
# Tencent analytics, set APP ID
263
278
# See: https://mta.qq.com/h5/manage/ctr_app_manage
Original file line number Diff line number Diff line change 31
31
< / script>
32
32
< % } % >
33
33
34
+ < % if (theme .web_analytics .umami && theme .web_analytics .umami .src && theme .web_analytics .umami .data_website_id ) { % >
35
+ <!-- Umami Analytics -->
36
+ < script async defer src= " <%= theme.web_analytics.umami.src %>" data- website- id= " <%= theme.web_analytics.umami.data_website_id %>"
37
+ < % if (theme .web_analytics .umami .data_domains ) { % > data- domains= " <%= theme.web_analytics.umami.data_domains %>" < % } % >
38
+ < % if (theme .web_analytics .follow_dnt ) { % > data- do - not- track= " <%= theme.web_analytics.follow_dnt %>" < % } % >
39
+ >< / script>
40
+ < % } % >
41
+
34
42
< % if (theme .web_analytics .tencent && theme .web_analytics .tencent .sid && theme .web_analytics .tencent .cid ) { % >
35
43
<!-- Tencent Analytics -->
36
44
< script async >
You can’t perform that action at this time.
0 commit comments