Merge pull request #5156 from overleaf/ta-registration-properties-cleanup

Registration Sources User Properties Cleanup

GitOrigin-RevId: 114f8a8a2102b6a1045594aef96d25aa530f9f9b
This commit is contained in:
Timothée Alby 2021-10-04 14:28:38 +02:00 committed by Copybot
parent 7c384d5f26
commit e56abc42df
2 changed files with 0 additions and 10 deletions

View file

@ -4,7 +4,6 @@ const AnalyticsManager = require('./AnalyticsManager')
function clearSource(session) { function clearSource(session) {
if (session) { if (session) {
delete session.required_login_for
delete session.required_login_from_product_medium delete session.required_login_from_product_medium
delete session.required_login_from_product_source delete session.required_login_from_product_source
} }
@ -105,14 +104,6 @@ function addUserProperties(userId, session) {
) )
} }
if (session.required_login_for) {
AnalyticsManager.setUserPropertyForUser(
userId,
`registered-from-${session.required_login_for}`,
true
)
}
if (session.inbound) { if (session.inbound) {
if (session.inbound.referrer && session.inbound.referrer.medium) { if (session.inbound.referrer && session.inbound.referrer.medium) {
AnalyticsManager.setUserPropertyForUser( AnalyticsManager.setUserPropertyForUser(

View file

@ -6,7 +6,6 @@ const SessionManager = require('../../Features/Authentication/SessionManager')
function setSource(medium, source) { function setSource(medium, source) {
return function (req, res, next) { return function (req, res, next) {
if (req.session) { if (req.session) {
req.session.required_login_for = medium
req.session.required_login_from_product_medium = medium req.session.required_login_from_product_medium = medium
if (source) { if (source) {
req.session.required_login_from_product_source = source req.session.required_login_from_product_source = source