mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-05-27 19:11:56 +02:00
[web] implement split test assignment based on mongo user GitOrigin-RevId: d3e2dff6a5e925cfd0426e9ebfeb7b64dc803f42
9 lines
257 B
JavaScript
9 lines
257 B
JavaScript
function getAnalyticsIdFromMongoUser(user) {
|
|
// ensure `analyticsId` is set to the user's `analyticsId`, and fallback to their `userId` for pre-analyticsId users
|
|
return user.analyticsId || user._id
|
|
}
|
|
|
|
module.exports = {
|
|
getAnalyticsIdFromMongoUser,
|
|
}
|