https://www.growthbook.io/ logo
#announcements
Title
# announcements
l

lemon-stone-42630

04/26/2022, 7:12 PM
Hi! I'm wondering about the implementation of the SSR single-page app. How does the analysis system work if we track the A/B experiment view once in server-side render and once when the app hydrates on client-side? Both saved values would have the same session_id as a unique identifier but the timestamp will vary. I know that the
trackingCallback
fires only once per experiment view but our growthbook instance in server render and client-side do not communicate between each other and the view event is sent once on both. Do we need to drop another one when making a query to the analysis, or can we leave it as is and analysis recognizes those experiment viewed events as coming from the single session? Or how have you worked around this? The feature we have affects on server-side code and client-side code so it will be triggered on both sides for the same user.
f

future-teacher-7046

04/26/2022, 7:13 PM
We deduplicate the events during analysis and take the earliest timestamp.
👍 1
l

lemon-stone-42630

04/26/2022, 7:16 PM
Does it matter if they have some seperate attributes: For example other have
platform: server
and other
platform: web
? Or should we use same
platform
on both (server and client)?
f

future-teacher-7046

04/26/2022, 7:22 PM
It's fine if they are different. If you drill down into results by the platform dimension, those users will be included in multiple groups, which is usually not a problem.
l

lemon-stone-42630

04/26/2022, 7:23 PM
Thanks for the quick response! 🤩
10 Views