Merge pull request #5777 from overleaf/ab-utm-term-content

Track utm_content param and replace utm_term in utm-tags property

GitOrigin-RevId: 868274a3dc4f44705f1e8340592ee05acc471b19
This commit is contained in:
Alexandre Bourdin
2021-11-23 09:02:43 +00:00
committed by Copybot
parent 033b9bd982
commit fa6bc3fc7b
3 changed files with 16 additions and 13 deletions
@@ -22,14 +22,11 @@ function recordUTMTags() {
...utmValues,
})
const propertyValue = [
'utm_source',
'utm_medium',
'utm_campaign',
'utm_term',
]
.map(tag => utmValues[tag] || 'N/A')
.join(';')
const propertyValue = `${utmValues.utm_source || 'N/A'};${
utmValues.utm_medium || 'N/A'
};${utmValues.utm_campaign || 'N/A'};${
utmValues.utm_content || utmValues.utm_term || 'N/A'
}`
AnalyticsManager.setUserPropertyForSession(
req.session,
'utm-tags',
@@ -5,6 +5,7 @@ const UTM_KEYS = [
'utm_campaign',
'utm_source',
'utm_term',
'utm_content',
'utm_medium',
'utm_count',
]