From af06de4e8f9ac6b2ee0c7a21790f7ac7cebe1103 Mon Sep 17 00:00:00 2001 From: Eric Mc Sween <5454374+emcsween@users.noreply.github.com> Date: Fri, 19 Jan 2024 14:09:25 -0500 Subject: [PATCH] Merge pull request #16621 from overleaf/jpa-writefull-integration-user-property [web] add user property for writefull-integration GitOrigin-RevId: b3b0ec8290db318d17b426be050266522d420bf4 --- .../web/app/src/Features/Analytics/AnalyticsManager.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/services/web/app/src/Features/Analytics/AnalyticsManager.js b/services/web/app/src/Features/Analytics/AnalyticsManager.js index 729f98f35a..776a15db6f 100644 --- a/services/web/app/src/Features/Analytics/AnalyticsManager.js +++ b/services/web/app/src/Features/Analytics/AnalyticsManager.js @@ -84,7 +84,7 @@ async function setUserPropertyForUser(userId, propertyName, propertyValue) { const analyticsId = await UserAnalyticsIdCache.get(userId) if (analyticsId) { - _setUserProperty({ analyticsId, propertyName, propertyValue }) + await _setUserProperty({ analyticsId, propertyName, propertyValue }) } } @@ -99,7 +99,7 @@ async function setUserPropertyForAnalyticsId( _checkPropertyValue(propertyValue) - _setUserProperty({ analyticsId, propertyName, propertyValue }) + await _setUserProperty({ analyticsId, propertyName, propertyValue }) } async function setUserPropertyForSession(session, propertyName, propertyValue) { @@ -111,7 +111,7 @@ async function setUserPropertyForSession(session, propertyName, propertyValue) { _checkPropertyValue(propertyValue) if (analyticsId) { - _setUserProperty({ analyticsId, propertyName, propertyValue }) + await _setUserProperty({ analyticsId, propertyName, propertyValue }) } } @@ -206,7 +206,7 @@ function _recordEvent( }) } -function _setUserProperty({ analyticsId, propertyName, propertyValue }) { +async function _setUserProperty({ analyticsId, propertyName, propertyValue }) { if (!_isAttributeValid(propertyName)) { logger.info( { analyticsId, propertyName, propertyValue }, @@ -225,7 +225,7 @@ function _setUserProperty({ analyticsId, propertyName, propertyValue }) { status: 'adding', event_type: 'user-property', }) - analyticsUserPropertiesQueue + await analyticsUserPropertiesQueue .add('user-property', { analyticsId, propertyName,