mirror of
https://gitee.com/huanghongxun/HMCL-docs.git
synced 2026-12-03 03:08:27 +08:00
refactor: refactor to 11ty to support Tencent Cloud EdgeOne Maker
continuous-integration/drone/push Build is failing
continuous-integration/drone/push Build is failing
This commit is contained in:
@@ -0,0 +1,3 @@
|
||||
<!-- start custom analytics snippet -->
|
||||
|
||||
<!-- end custom analytics snippet -->
|
||||
@@ -0,0 +1,9 @@
|
||||
<!-- Global site tag (gtag.js) - Google Analytics -->
|
||||
<script async src="https://www.googletagmanager.com/gtag/js?id={{ site.analytics.google.tracking_id }}"></script>
|
||||
<script>
|
||||
window.dataLayer = window.dataLayer || [];
|
||||
function gtag(){dataLayer.push(arguments);}
|
||||
gtag('js', new Date());
|
||||
|
||||
gtag('config', '{{ site.analytics.google.tracking_id }}', { 'anonymize_ip': {{ site.analytics.google.anonymize_ip | default: false }}});
|
||||
</script>
|
||||
@@ -0,0 +1,7 @@
|
||||
<script>
|
||||
window.ga=function(){ga.q.push(arguments)};ga.q=[];ga.l=+new Date;
|
||||
ga('create','{{ site.analytics.google.tracking_id }}','auto');
|
||||
ga('set', 'anonymizeIp', {{ site.analytics.google.anonymize_ip | default: false }});
|
||||
ga('send','pageview')
|
||||
</script>
|
||||
<script src="https://www.google-analytics.com/analytics.js" async></script>
|
||||
@@ -0,0 +1,14 @@
|
||||
<script>
|
||||
var _gaq = _gaq || [];
|
||||
_gaq.push(['_setAccount', '{{ site.analytics.google.tracking_id }}']);
|
||||
{% if site.analytics.google.anonymize_ip == true %}
|
||||
_gaq.push(['_gat._anonymizeIp']);
|
||||
{% endif %}
|
||||
_gaq.push(['_trackPageview']);
|
||||
|
||||
(function() {
|
||||
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
|
||||
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
|
||||
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
|
||||
})();
|
||||
</script>
|
||||
@@ -0,0 +1,15 @@
|
||||
<script src="https://swetrix.org/swetrix.js" defer></script>
|
||||
<script>
|
||||
document.addEventListener("DOMContentLoaded", function () {
|
||||
swetrix.init("{{ site.analytics.swetrix.tracking_id }}");
|
||||
swetrix.trackViews();
|
||||
});
|
||||
</script>
|
||||
|
||||
<noscript>
|
||||
<img
|
||||
src="https://api.swetrix.com/log/noscript?pid={{ site.analytics.swetrix.tracking_id }}"
|
||||
alt=""
|
||||
referrerpolicy="no-referrer-when-downgrade"
|
||||
/>
|
||||
</noscript>
|
||||
Reference in New Issue
Block a user