From 96d1b6e3341151934efaa1fa0b93183cd07aa77f Mon Sep 17 00:00:00 2001 From: Sonny Arora Date: Sat, 18 Feb 2023 12:00:26 -0500 Subject: [PATCH] Add Google Analytics 4 Support --- _config.yml | 2 +- _includes/analytics-providers/google-analytics-4.html | 8 ++++++++ _includes/analytics.html | 2 ++ 3 files changed, 11 insertions(+), 1 deletion(-) create mode 100644 _includes/analytics-providers/google-analytics-4.html diff --git a/_config.yml b/_config.yml index 1dc605cc6e928..c9916988e0b74 100644 --- a/_config.yml +++ b/_config.yml @@ -73,7 +73,7 @@ social: # Analytics analytics: - provider : "google-universal" # false (default), "google", "google-universal", "custom" + provider : "google-universal" # false (default), "google", "google-universal", "google-analytics-4", "custom" google: tracking_id : diff --git a/_includes/analytics-providers/google-analytics-4.html b/_includes/analytics-providers/google-analytics-4.html new file mode 100644 index 0000000000000..c1ed70c323896 --- /dev/null +++ b/_includes/analytics-providers/google-analytics-4.html @@ -0,0 +1,8 @@ + + diff --git a/_includes/analytics.html b/_includes/analytics.html index 64a3359aad4e4..8f3dda96622ce 100644 --- a/_includes/analytics.html +++ b/_includes/analytics.html @@ -5,6 +5,8 @@ {% 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 %}