https://www.growthbook.io/ logo
#ask-questions
Title
# ask-questions
f

fancy-candle-92347

05/19/2022, 4:50 PM
Hello, can someone guide me on how the traffic and split is applied? I have my control and variant segments in the same source table in ~50-50 split (total users=4128841, control=2064184, variant1=2064657). I have traffic set to 100 and split 50-50 however in my result the traffic allocation looks off . Also when I change the split I get sample Ratio mismatch warning. User count wrt to dimension
Copy code
varient=0 and value=1
2062596
varient=0 and value=2
2061
varient=1 and value=1
2062117
varient=0 and value=2
2067
f

future-teacher-7046

05/19/2022, 4:56 PM
What is the
value
dimension?
f

fancy-candle-92347

05/19/2022, 5:23 PM
thats int value with 1 as impression and 2 as user clicked on ad
f

future-teacher-7046

05/19/2022, 5:29 PM
ah, so those should probably be metrics and not a dimension
you would have 2 metrics, one for impressions and one for "clicked on ad"
f

fancy-candle-92347

05/19/2022, 5:30 PM
yes so in my metric query I am filtering user with where condition (
where value=2
)
I want to measure click on ad wrt to total impression shown, so I defined metric with where
value=2
.
Also if I dont define dimension it keeps on complaining about dimension cannot be resolved
@future-teacher-7046 looks like there is bug in the dimension query, by default dimension query uses
substr(0, 10)
however the index position for first character starts from 1.
Copy code
__distinctUsers as (
  -- One row per user/dimension
  SELECT
    e.user_id,
    substr(
      to_iso8601(date_trunc('day', e.conversion_start)),
      0,
      10
    ) as dimension,
    (
      CASE
      WHEN count(distinct e.variation) > 1 THEN '__multiple__'
      ELSE max(e.variation) END
    ) as variation,
    MIN(e.conversion_start) as conversion_start,
    MIN(e.conversion_end) as conversion_end
  FROM
    __experiment e
  GROUP BY
    dimension,
    e.user_id
),
f

future-teacher-7046

05/20/2022, 11:37 AM
Ah, thanks for catching that. We only use substr for Presto/Athena. I'll fix it to be 1-based.
I fixed the substr bug in the latest Docker build
🙌 1
f

fancy-candle-92347

05/20/2022, 4:13 PM
Thanks let me pull the latest one
7 Views