Hey guys, I’ve one short doubt. I’d like to run ex...
# ask-questions
b
Hey guys, I’ve one short doubt. I’d like to run experiment on recommendation algorithm to serve on mobile app. Just would like to get an idea of where should I put Segment tracking on ? • backend which connect to Growthboook to get feature definition and provide recommendation algorithm. • Or,, mobile client which render recommendation result to users. I thought it should be (1), am I correct ?
f
Hi Poom. You can do either. The further away from the actual exposure to the variations the more noise there will be in the signal - you even fire both events and use the mobile client event as an activation metric in the reporting, which will only include users that are exposed to the experiment AND the activation event. You might want to do this approach if you don't want to send the feature list to the mobile client, for example.
b
Thanks @fresh-football-47124, just wondering if we send tracking from backend service. In case of anonymous user (don’t have userId). How should we send tracking to Segment to ensure Segment recognize the same anonymous user View experiment (from backend) and convert (tracked from mobile)
f
There might be an elegant way to do this if you can pass back the anon id to the back end - but segments libraries don't generate anonymous ids on the backend. Is that available for the backend request? If you don't need the experiment variation to match on the backend and frontend, you can create any ID for the user (like sessionID, that can be stored somewhere, or hash the user agent string) on the back end request, bucket based on this with growthBook, and pass that event with that ID to segment (with an identify call). In GrowthBook, you can add another identifier, and define a query on how to join between the two (if you have metrics that require a different Id).