Hi all, I'm looking into using Growthbook to test ...
# ask-questions
k
Hi all, I'm looking into using Growthbook to test out features from our python backend. Currently we use GA to log metrics from our client apps. I've just tried setting up GA as a data source, and implement an experiment in our python backend, however, I'm stuck at the experiment trigger callback. GA is meant for clients, so I'm not sure I can send the experiment assignment event from our python code. Is there a way to setup a different data source which can simply be a DB that holds the experiment assignments, and use that?
f
Hi Maxime - Currently, although you can add multiple data sources, experiments must be able to pull data from the same source (ie: we can’t join across data sources). If you’re using GA4, you probably are piping that data to BigQuery (and its easy to do if not). So what you’d need to do on the python side is to set a userId for assignment/bucketing, and then pass that also with the experiment exposure
trackingCallback
. This ID will also need to be available in BigQuery to join to the metric events- so you could pass this ID to GA4 so that the metrics will work.
k
I see! thanks Graham
f
sure, just to clarify, your trackingCallback would push data into some sort of BigQuery assignment table - you can use anything you like for this, not sure if GA has a python sdk, but you can do it directly or with a tool like Jitsu.
k
Yeah I was going to clarify, so we 1. Create a new table in the same bigquery dataset? This table will have user id, experiment_id, variant_id and timestamp columns. 2. Push the assignments from our backend using the trackingCallback. 3. Setup the query for this new table in the datasource dashboard.
f
correct
and then you’ll need to make sure that userId is available in any conversion events or metrics from GA that you want to use
k
Gotcha
f
👍