Skip to content

Commit

Permalink
maybe fix google analytics (#1747)
Browse files Browse the repository at this point in the history
Co-authored-by: Christopher Small <metasoarous@gmail.com>
  • Loading branch information
ballPointPenguin and metasoarous committed Nov 29, 2023
1 parent fa4595e commit fbb4f61
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion client-participation/js/routers/main-polis-router.js
Original file line number Diff line number Diff line change
Expand Up @@ -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());
}
});

Expand Down
4 changes: 2 additions & 2 deletions client-participation/js/util/gaMetric.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
Expand Down

0 comments on commit fbb4f61

Please sign in to comment.