Skip to content

Commit

Permalink
Update analytics.html
Browse files Browse the repository at this point in the history
  • Loading branch information
Xiaoyang-Xie authored Aug 3, 2024
1 parent 259d2f9 commit 1e5af16
Showing 1 changed file with 8 additions and 13 deletions.
21 changes: 8 additions & 13 deletions _includes/analytics.html
Original file line number Diff line number Diff line change
@@ -1,14 +1,9 @@
{% if site.analytics.provider and page.analytics != false %}
<!-- Google tag (gtag.js) -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-ZXSVRLHJK4"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());

{% case site.analytics.provider %}
{% when "google" %}
{% include /analytics-providers/google.html %}
{% when "google-universal" %}
{% include /analytics-providers/google-universal.html %}
{% when "google-analytics-4" %}
{% include /analytics-providers/google-analytics-4.html %}
{% when "custom" %}
{% include /analytics-providers/custom.html %}
{% endcase %}

{% endif %}
gtag('config', 'G-ZXSVRLHJK4');
</script>

0 comments on commit 1e5af16

Please sign in to comment.