Add user language segmentation to the home-page-view event (#28910)

* adding server side events language accept information for the events and domain in event segmentation

* only sending the first language

* adding fixes for tests

* adding domain for plans-page-view and paywall-plans-page-view

* adding domain for gallery-page-view

* adding it for payment-page-view

* rename variable

* removing language from login-page-view

* adding a fallback value

* removing domain from test

* removing extra comment

* adding test host

* removing extra console added by mistake

* format:fix

GitOrigin-RevId: d1a1a30e4635abdc2b93f88de14a1d8937f974c8
This commit is contained in:
Davinder Singh
2025-10-16 08:07:08 +00:00
committed by Copybot
parent d5296783a4
commit ac758f36ab
4 changed files with 34 additions and 1 deletions
@@ -17,9 +17,13 @@ function recordUTMTags() {
if (utmValues) {
const path = new URL(req.url, Settings.siteUrl).pathname
const host = req.headers.host
const domain = host?.split('.')[0]
AnalyticsManager.recordEventForSession(req.session, 'page-view', {
path,
...utmValues,
domain,
})
const propertyValue = `${utmValues.utm_source || 'N/A'};${