From 0a134274b0479c1c6434745b1cdaaeea1b0b33e1 Mon Sep 17 00:00:00 2001 From: Garrick Aden-Buie Date: Mon, 31 Jul 2023 14:00:45 -0400 Subject: [PATCH 1/2] fix(181-google-analytics): Update GA v4 Replace `ga()` with `gtag()` --- 181-google-analytics/google-analytics.html | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/181-google-analytics/google-analytics.html b/181-google-analytics/google-analytics.html index 42127fbb..b4d6bd3e 100644 --- a/181-google-analytics/google-analytics.html +++ b/181-google-analytics/google-analytics.html @@ -8,10 +8,13 @@ gtag('config', 'UA-160622973-1'); $(document).on('change', 'select', function(e) { - ga('send', 'event', 'widget', 'select data', $(e.currentTarget).val()); + gtag('event', 'widget', { + action: 'select data', + label: $(e.currentTarget).val() + }); }); $(document).on('click', 'button', function() { - ga('send', 'event', 'button', 'plot data'); + gtag('event', 'button', { action: 'update plot' }); }); From 07dc2df19a912c16f403b57115e1f0fc6c7fd658 Mon Sep 17 00:00:00 2001 From: Garrick Aden-Buie Date: Thu, 3 Aug 2023 13:21:45 -0400 Subject: [PATCH 2/2] chore: Use gt style tag --- 181-google-analytics/google-analytics.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/181-google-analytics/google-analytics.html b/181-google-analytics/google-analytics.html index b4d6bd3e..313a5a3c 100644 --- a/181-google-analytics/google-analytics.html +++ b/181-google-analytics/google-analytics.html @@ -1,11 +1,11 @@ - +