From 92125439fc445ae6197d721e304c2936279ea30b Mon Sep 17 00:00:00 2001 From: Joseph Hale Date: Tue, 6 Feb 2024 22:03:29 -0700 Subject: [PATCH] feat: Add support for Cloudflare Web Analytics --- _config.yml | 3 +++ _includes/cloudflare-analytics.html | 1 + _includes/js-selector.html | 5 +++++ 3 files changed, 9 insertions(+) create mode 100644 _includes/cloudflare-analytics.html diff --git a/_config.yml b/_config.yml index 7bef4bd..9c5c9ed 100644 --- a/_config.yml +++ b/_config.yml @@ -52,6 +52,9 @@ google_site_verification: # fill in to your verification string google_analytics: id: # fill in your Google Analytics ID +cloudflare_analytics: + token: # fill in your Cloudflare Web Analytics token (from JS Snippet installation) + # Prefer color scheme setting. # # Note: Keep empty will follow the system prefer color by default, diff --git a/_includes/cloudflare-analytics.html b/_includes/cloudflare-analytics.html new file mode 100644 index 0000000..58076c1 --- /dev/null +++ b/_includes/cloudflare-analytics.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/_includes/js-selector.html b/_includes/js-selector.html index 6352c96..91ee4d5 100644 --- a/_includes/js-selector.html +++ b/_includes/js-selector.html @@ -103,4 +103,9 @@ {% if site.google_analytics.id != empty and site.google_analytics.id %} {% include google-analytics.html %} {% endif %} + + + {% if site.cloudflare_analytics.token != empty and site.cloudflare_analytics.token %} + {% include cloudflare-analytics.html %} + {% endif %} {% endif %} -- 2.51.2