https://www.growthbook.io/ logo
h

helpful-fountain-84673

03/31/2022, 8:10 PM
Hi folks, we’re trying to setup our first metric and kick the tires on growthbook. Our particular integration is going to use BQ. None of our columns are INT so we get an error on the SUM when trying to configure the metric. All our columns are string or timestamp. Is this a situation you’ve run into before and can provide some guidance on? Basically we want this metric to measure against the total number of event clicks on a button.
f

future-teacher-7046

03/31/2022, 8:12 PM
If you want to count the number of rows for each user, you can select a hard-coded integer:
SELECT 1 as value, ...
That will give each event a value of 1 and then when we aggregate by user, we will sum those together to get a count
h

helpful-fountain-84673

03/31/2022, 8:18 PM
Nice that works perfectly. So to be clear with this method a user would only be tracked once regardless of how many times they’ve clicked the button?
f

future-teacher-7046

03/31/2022, 8:19 PM
if you just want to track the percent of users who converted, you would choose the metric type
binomial
. If you choose that, you don't need to select a
value
column at all. If you wanted to count the average number of button clicks per user, you would choose the metric type
count
and use a hard-coded value like above
h

helpful-fountain-84673

03/31/2022, 8:20 PM
@microscopic-lock-65996 see above ^
m

microscopic-lock-65996

03/31/2022, 8:20 PM
Thanks @future-teacher-7046!
What about a total count of clicks? Or would we want binomial and let the stats engine do its thing
f

future-teacher-7046

03/31/2022, 8:23 PM
total counts don't usually work very well since the variations might not have exactly equal sample sizes. You typically want to compare per-user values instead
👍 2
m

microscopic-lock-65996

04/04/2022, 8:53 PM
@future-teacher-7046 @fresh-football-47124 Hey guys, Drew saw this and we realized we don't have an
experiment_id
field in BQ. Do we need to set this manually in Segment? Also, I think I remember that we need to set a custom event in each variation -- I am having trouble finding that in the documentation. Do either of you know where I might look to learn more?
f

fresh-football-47124

04/04/2022, 8:54 PM
if you're using our SDK, you would fire the segment call inside the tracking callback: https://docs.growthbook.io/lib/js#tracking-callback
👍 1
f

future-teacher-7046

04/04/2022, 8:54 PM
You would fire a brand new segment event called "viewed experiment" or something similar that has the experiment id and which variation they saw.
👍 1
m

microscopic-lock-65996

04/05/2022, 4:15 PM
Hey guys, our experiment is running but we're having trouble accessing results. Do we need to update our BQ schema to include an experiment_id column?
f

future-teacher-7046

04/05/2022, 6:48 PM
You shouldn't need to touch the BigQuery schema yourself. Segment handles all of that for you. It can take an hour or two for Segment data to show up in a warehouse though
You can use the Segment Debugger to see if the event is firing in realtime
m

microscopic-lock-65996

04/05/2022, 6:49 PM
Thanks Jeremy, we are seeing this error:
h

helpful-fountain-84673

04/05/2022, 6:51 PM
According to segment we are tracking properly.
f

fresh-football-47124

04/05/2022, 6:54 PM
can you paste the schema or sample from "datastax-datalake.www.tracks_view"
h

helpful-fountain-84673

04/05/2022, 6:56 PM
f

future-teacher-7046

04/05/2022, 6:57 PM
When did you first start firing that event with the
experimentId
attribute?
h

helpful-fountain-84673

04/05/2022, 6:58 PM
I’m not 100% sure this is where I should be looking for the
experiment_id
column, but I’ve been scanning several other tables and don’t see it in them either. We started firing that event about 2 hours ago
f

future-teacher-7046

04/05/2022, 6:58 PM
oh wait, I see the problem
Segment creates a new table for every event type
So you should see a table in BigQuery called
experiment_viewed
h

helpful-fountain-84673

04/05/2022, 6:59 PM
I don’t see that, but maybe there is a bit of a delay in that showing up?
f

future-teacher-7046

04/05/2022, 7:00 PM
do you see other event-specific tables in BigQuery?
h

helpful-fountain-84673

04/05/2022, 7:01 PM
yea we have several of them
f

future-teacher-7046

04/05/2022, 7:05 PM
ok, it's possible Segment hasn't synced the new table yet. I think there's a way to view a history of data warehouse syncs in the Segment dashboard
h

helpful-fountain-84673

04/05/2022, 7:06 PM
yep thats a good point, last sync was 5 hours ago. so we’ll sit tight and see if it works after the next sync. thanks for the help
4 Views