我正在使用 Fathom Analytics,并尝试嵌入一段用于网站追踪的 JS 脚本,代码如下:
<!-- Fathom - 简单的网站分析工具 - https://github.com/usefathom/fathom -->
<script>
(function(f, a, t, h, o, m){
a[h]=a[h]||function(){
(a[h].q=a[h].q||[]).push(arguments)
};
o=f.createElement('script'),
m=f.getElementsByTagName('script')[0];
o.async=1; o.src=t; o.id='fathom-script';
m.parentNode.insertBefore(o,m)
})(document, window, '//fathom.example.org/tracker.js', 'fathom');
fathom('set', 'siteId', 'ABCDEF');
fathom('trackPageview');
</script>
<!-- / Fathom -->
我通过“自定义 > 主题 > 自定义 CSS/HTML”设置将此脚本添加到 <head> 部分。
但当我加载网站时,Fathom 的 tracker.js 脚本获取失败:
控制台还显示了其他错误:
Uncaught (in promise) no-response: no-response :: [{"url":"https://fathom.example.org/tracker.js"}]
at a.makeRequest (https://discuss.example.org/javascripts/workbox/workbox-strategies.prod.js:1:2145)
看起来 Fathom 干扰了该 JS 脚本的获取。我该如何解决这个问题?
我使用的版本是 2.6.0.beta1。
