breezy-king-73167
05/09/2023, 12:56 AMbusy-air-96466
05/10/2023, 8:25 AMSELECT
user_id,
user_pseudo_id as anonymous_id,
TIMESTAMP_MICROS(event_timestamp) as timestamp,
1 as value
FROM
``analytics_356435236.events_*``
WHERE
event_name = 'Click counter button'
AND _TABLE_SUFFIX BETWEEN '20230328' AND '20231231'
And it shows a graph that looks as I’d expect from my mocked-up BigQuery data, but the experiment is showing a result of ‘1’ instead of the expected 5 to 10 clicks per user.
This is the experiment query:
-- Counter button clicks, no intraday in query (count)
WITH
__rawExperiment as (
SELECT
user_id as user_id,
TIMESTAMP_MICROS(event_timestamp) as timestamp,
experiment_id_param.value.string_value AS experiment_id,
<http://variation_id_param.value.int|variation_id_param.value.int>_value AS variation_id,
geo.country as country,
traffic_source.source as source,
traffic_source.medium as medium,
device.category as device,
device.web_info.browser as browser,
device.operating_system as os
FROM
(
SELECT
*
FROM
``analytics_356435236.events_*``
WHERE
_TABLE_SUFFIX BETWEEN '20230330' AND '20230512'
UNION ALL
SELECT
*
FROM
``analytics_356435236.events_intraday_*``
WHERE
_TABLE_SUFFIX BETWEEN '20230330' AND '20230512'
),
UNNEST (event_params) AS experiment_id_param,
UNNEST (event_params) AS variation_id_param
WHERE
event_name = 'experiment_viewed'
AND experiment_id_param.key = 'experiment_id'
AND variation_id_param.key = 'variation_id'
AND user_id is not null
),
__experiment as ( -- Viewed Experiment
SELECT
e.user_id as user_id,
cast(e.variation_id as string) as variation,
CAST(e.timestamp as DATETIME) as timestamp,
CAST(e.timestamp as DATETIME) as conversion_start,
DATETIME_ADD(CAST(e.timestamp as DATETIME), INTERVAL 72 HOUR) as conversion_end
FROM
__rawExperiment e
WHERE
e.experiment_id = 'new-secondary-panel-title'
AND CAST(e.timestamp as DATETIME) >= DATETIME("2023-03-30 17:01:00")
),
__metric as ( -- Metric (Counter button clicks, no intraday in query)
SELECT
user_id as user_id,
m.value as value,
CAST(m.timestamp as DATETIME) as timestamp,
CAST(m.timestamp as DATETIME) as conversion_start,
CAST(m.timestamp as DATETIME) as conversion_end
FROM
(
SELECT
user_id,
user_pseudo_id as anonymous_id,
TIMESTAMP_MICROS(event_timestamp) as timestamp,
1 as value
FROM
``analytics_356435236.events_*``
WHERE
event_name = 'Click counter button'
AND _TABLE_SUFFIX BETWEEN '20230328' AND '20231231'
) m
WHERE
CAST(m.timestamp as DATETIME) >= DATETIME("2023-03-30 17:01:00")
),
__distinctUsers as (
-- One row per user
SELECT
e.user_id as user_id,
cast('All' as string) 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
e.user_id
),
__userMetric as (
-- Add in the aggregate metric value for each user
SELECT
d.variation,
d.dimension,
d.user_id,
SUM(m.value) as value
FROM
__distinctUsers d
JOIN __metric m ON (m.user_id = d.user_id)
WHERE
m.timestamp >= d.conversion_start
AND m.timestamp <= d.conversion_end
GROUP BY
d.variation,
d.dimension,
d.user_id
),
__stats AS (
-- One row per variation/dimension with aggregations
SELECT
m.variation,
m.dimension,
COUNT(*) AS count,
SUM(COALESCE(m.value, 0)) AS main_sum,
SUM(POWER(COALESCE(m.value, 0), 2)) AS main_sum_squares
FROM
__userMetric m
GROUP BY
m.variation,
m.dimension
),
__overallUsers as (
-- Number of users in each variation/dimension
SELECT
variation,
dimension,
COUNT(*) as users
FROM
__distinctUsers
GROUP BY
variation,
dimension
)
SELECT
u.variation,
u.dimension,
u.users AS users,
'mean' as statistic_type,
'count' as main_metric_type,
COALESCE(s.main_sum, 0) AS main_sum,
COALESCE(s.main_sum_squares, 0) AS main_sum_squares
FROM
__overallUsers u
LEFT JOIN __stats s ON (
u.variation = s.variation
AND u.dimension = s.dimension
)
I’ve essentially been stuck on this for weeks, I can’t see how to make a ‘count’ experiment work. I can download some sample data as CSV if that will help? Please, I am sure there must be something I’m doing wrong, but I cannot see it.magnificent-army-44319
05/10/2023, 2:24 PMhandsome-hydrogen-73972
05/10/2023, 4:33 PMURI malformed
error, I already check that the credentials, ports and database are correct, is there any documentation of what GrowthBook expects me to do to integrate it with ClickHouse?worried-yacht-64692
05/15/2023, 3:02 PMbrave-jelly-4060
05/16/2023, 8:48 AMdamp-branch-45047
05/16/2023, 11:00 AMfew-leather-47942
05/16/2023, 2:28 PMAND regexp_extract(_TABLE_SUFFIX, '[0-9]+') BETWEEN '20230515' AND '20230518'
This is changed in the query for the specific metric. Further down the automatic script for the experiment, this is changed as well. But not for this first part of the experiment script.
Where does it come from and how can I edit this? Thanks in advance 🙏hallowed-lifeguard-32533
05/16/2023, 2:46 PMuser_id
and the registration timestamp, with a where clause that required the date diff between registration timestamp and current timestamp to be greater than 7 days.
I need to return the registration timestamp so that the conversion window for the conversion metric works properly, but by definition the registration timestamp is before the user is bucketed in the experiment, so is not counted in the experiment calculation.
Would very much appreciate help here - there are lots of metrics that we need to write in this way to align with our other reporting.plain-thailand-11534
05/16/2023, 3:08 PMgray-mouse-26589
05/17/2023, 11:43 AMworried-yacht-64692
05/17/2023, 2:13 PMbusy-air-96466
05/17/2023, 2:26 PMjolly-journalist-68574
05/17/2023, 6:30 PMviewed_experiment
table in BigQuery. Are the records in this table supposed to be events triggered by the SDK's trackingCallback
?
2. We want to add Dimensions to this table (like the GrowthBook UI suggests). If Dimensions = Targeting Attributes, how do we get those into the same event that populates the viewed_experiment
table? It doesn't seem like the trackingCallback
returns with the Targeting Attributes, what's the best practice here?melodic-pencil-54185
05/18/2023, 12:26 PMminiature-agency-3305
05/18/2023, 12:43 PMError connecting to the GrowthBook API at http://<my-server-ip>:3100.
I have added these variables in my docker-compose.yml:
environment:
- APP_ORIGIN=http://<my-server-ip>:3000
- API_HOST=http://<my-server-ip>:3100
removed my ip from the example above but it does not seem to be working, I still get the issue.
Does someone know why?blue-agent-15067
05/18/2023, 12:57 PMhallowed-lifeguard-32533
05/22/2023, 10:40 AMquiet-monkey-7986
05/22/2023, 11:47 AMjolly-journalist-68574
05/22/2023, 10:48 PMtrackingCallback
does NOT fire for that user for that feature? Is that expected behaviorhandsome-napkin-90517
05/23/2023, 9:54 AMlimited-ghost-77841
05/25/2023, 3:58 AMbig-florist-81994
05/25/2023, 2:57 PMhandsome-lifeguard-47545
05/25/2023, 7:47 PMjolly-journalist-68574
05/26/2023, 8:35 PMexperiment_id, experiment_name, variation_name
?
This is the SDK output that our Engineers are sending to me:
"experiment": {
"force": null,
"variations": [
{
"id_2": 2,
"id_3": 3,
"id_1": 1
},
{
"id_1": 4,
"id_2": 5,
"id_3": 6
},
{
"id_1": 7,
"id_2": 8,
"id_3": 9
}
],
"namespace": null,
"hashAttribute": "id",
"key": "test-json",
"weights": [
0.3334,
0.3333,
0.3333
],
"active": true,
"coverage": 1,
"condition": null
},
"experimentResult": {
"value": {
"id_1": 7,
"id_2": 8,
"id_3": 9
},
"hashUsed": true,
"hashAttribute": "id",
"hashValue": "ec62aa1bc0b142348b3ea6ea0382a722",
"inExperiment": true,
"variationId": 2
}
• Feature Key = Experiment ID? like test-json
in the example above
• What is an example of "Experiment Name"? Where in the GrowthBook UI is that input?
• How do we get "Experiment Name" and "Variation Name" to be passed back by the SDK?few-leather-47942
05/31/2023, 11:35 AMplain-jordan-57405
06/01/2023, 11:00 AMenough-psychiatrist-34168
06/05/2023, 7:07 PMv2.1.1
{"level":50,"time":1685991856283,"pid":500,"hostname":"growthbook-56b644d9b8-f89xj","err":{"type":"MongoParseError","message":"Load balancer mode requires driver version 4+","stack":"MongoParseError: Load balancer mode requires driver version 4+\n at QueryReqWrap.callback (/usr/local/src/app/node_modules/mongodb/lib/core/uri_parser.js:111:27)\n at QueryReqWrap.onresolve [as oncomplete] (node:dns:281:10)","name":"MongoParseError"},"msg":"Failed to connect to MongoDB"}
| {"level":50,"time":1685991856285,"pid":500,"hostname":"growthbook-56b644d9b8-f89xj","err":{"type":"Error","message":"MongoDB connection error.","stack":"Error: MongoDB connection error.\n at /usr/local/src/app/packages/back-end/dist/init/mongo.js:35:15\n at Generator.throw (<anonymous>)\n at rejected (/usr/local/src/app/packages/back-end/dist/init/mongo.js:6:65)"},"msg":"Failed to initialize application"}
green-beard-48160
06/06/2023, 10:26 AMgray-ghost-37903
06/08/2023, 1:47 PMgrowthbook-growthbook-1
with the error:
Failed to connect to MongoDB. Retrying with field remapping for mongodb v3 to v4
Is this a known issue?