diff --git a/legacy/app/auth/authentication.service.js b/legacy/app/auth/authentication.service.js index 5beffcb6a4..df610cdb7f 100644 --- a/legacy/app/auth/authentication.service.js +++ b/legacy/app/auth/authentication.service.js @@ -58,7 +58,7 @@ function ( detail: { event: 'user logged in', event_type: 'user_interaction', - user_role: userData.role == 'admin' ? 'admin' : 'member' + user_role: userData.role === 'admin' ? 'admin' : 'member' } })); } diff --git a/legacy/app/gtm-userprops.js b/legacy/app/gtm-userprops.js index 28dd918a9d..afb30775e6 100644 --- a/legacy/app/gtm-userprops.js +++ b/legacy/app/gtm-userprops.js @@ -22,7 +22,7 @@ function ($q, ConfigEndpoint, UserEndpoint) { if (x.id && x.role) { // According to data dictionary: // https://docs.google.com/document/d/1ulZerckIGun-mv4ASu2nEFGFTpqcYwBXd3HR95eKj68 - x.role_level = x.role == 'admin' ? 'admin' : 'member'; + x.role_level = x.role === 'admin' ? 'admin' : 'member'; } user.resolve(x); }).catch(function () { @@ -38,7 +38,7 @@ function ($q, ConfigEndpoint, UserEndpoint) { // in the analytics data warehouse var scopedUserId = undefined; if (user.id) { - scopedUserId = String(user.id) + "," + String(multisite.site_id || null); + scopedUserId = String(user.id) + ',' + String(multisite.site_id || null); } userProps.resolve({ @@ -65,10 +65,10 @@ function ($q, ConfigEndpoint, UserEndpoint) { // Initialize user properties along with this module triggerRefresh(); - + // Add event listener to refresh user properties on demand window.addEventListener('ush:analytics:refreshUserProperties', function () { triggerRefresh(); }); - + }];