diff --git a/client-participation/js/routers/main-polis-router.js b/client-participation/js/routers/main-polis-router.js index f9aa9042c..05eaa14bd 100644 --- a/client-participation/js/routers/main-polis-router.js +++ b/client-participation/js/routers/main-polis-router.js @@ -31,7 +31,7 @@ authenticatedDfd.done(function() { // link uid to GA userId // TODO update this whenever auth changes if (Constants.GA_TRACKING_ID) { - ga('set', 'userId', PolisStorage.uid() || PolisStorage.uidFromCookie()); + gtag('set', 'userId', PolisStorage.uid() || PolisStorage.uidFromCookie()); } }); diff --git a/client-participation/js/util/gaMetric.js b/client-participation/js/util/gaMetric.js index 7d1018e98..bfcec7d7a 100644 --- a/client-participation/js/util/gaMetric.js +++ b/client-participation/js/util/gaMetric.js @@ -39,9 +39,9 @@ var methodToEventMap = { // function gaEvent() { - // Sends all arguments to a ga('send', 'event', __) partial + // Sends all arguments to a gtag('event', __) partial if (Constants.GA_TRACKING_ID) { - ga_ = _.partial(ga, 'send', 'event'); + ga_ = _.partial(gtag, 'event'); ga_.apply(window, arguments); } }