diff --git a/_config.yml b/_config.yml index e3bc6be..4feeee0 100644 --- a/_config.yml +++ b/_config.yml @@ -49,13 +49,13 @@ social: # - https://www.facebook.com/username # - https://www.linkedin.com/in/username -google_site_verification: google_meta_tag_verification # change to your verification string +google_site_verification: # fill in to your verification string # ↑ -------------------------- google_analytics: - id: '' # fill in your Google Analytics ID + id: # fill in your Google Analytics ID # Google Analytics pageviews report settings pv: proxy_endpoint: # fill in the Google Analytics superProxy endpoint of Google App Engine diff --git a/_includes/head.html b/_includes/head.html index 710d47d..eac902b 100644 --- a/_includes/head.html +++ b/_includes/head.html @@ -40,7 +40,8 @@ - {% if jekyll.environment == 'production' %} + {% if jekyll.environment == 'production' + and site.google_analytics.id != empty and site.google_analytics.id %} diff --git a/_includes/js-selector.html b/_includes/js-selector.html index 219fe96..2e73f60 100644 --- a/_includes/js-selector.html +++ b/_includes/js-selector.html @@ -61,7 +61,7 @@ - {% if site.google_analytics.id %} + {% if site.google_analytics.id != empty and site.google_analytics.id %} {% include google-analytics.html %} {% endif %} diff --git a/assets/js/data/swcache.js b/assets/js/data/swcache.js index ec648a0..4017f74 100644 --- a/assets/js/data/swcache.js +++ b/assets/js/data/swcache.js @@ -43,7 +43,7 @@ const resource = [ /* The request url with below domain will be cached */ const allowedDomains = [ - {% if site.google_analytics.id != '' %} + {% if site.google_analytics.id != empty and site.google_analytics.id %} 'www.googletagmanager.com', 'www.google-analytics.com', {% endif %}