mirror of
https://github.com/cotes2020/jekyll-theme-chirpy.git
synced 2025-12-18 05:41:31 +00:00
Don't include Google Analytics scripts without analytics id (#482)
This commit is contained in:
committed by
Cotes Chung
parent
a6c73e8f4f
commit
4a2016a9e3
@@ -40,7 +40,8 @@
|
||||
<link rel="dns-prefetch" href="https://fonts.gstatic.com">
|
||||
|
||||
<!-- GA -->
|
||||
{% if jekyll.environment == 'production' %}
|
||||
{% if jekyll.environment == 'production'
|
||||
and site.google_analytics.id != empty and site.google_analytics.id %}
|
||||
<link rel="preconnect" href="https://www.google-analytics.com" crossorigin="use-credentials">
|
||||
<link rel="dns-prefetch" href="https://www.google-analytics.com">
|
||||
|
||||
|
||||
@@ -61,7 +61,7 @@
|
||||
<script defer src="{{ '/app.js' | relative_url }}"></script>
|
||||
|
||||
<!-- GA -->
|
||||
{% if site.google_analytics.id %}
|
||||
{% if site.google_analytics.id != empty and site.google_analytics.id %}
|
||||
{% include google-analytics.html %}
|
||||
{% endif %}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user