incalculable-yacht-10590
09/25/2023, 8:17 AMid = 5
, and then growthbook query to postgres (data source) to decide id = 5
will treat as experiment or control?white-fireman-22476
09/25/2023, 8:29 AMincalculable-yacht-10590
09/25/2023, 9:06 AMwhite-fireman-22476
09/25/2023, 9:59 AMincalculable-yacht-10590
09/25/2023, 11:47 AMwhite-fireman-22476
09/25/2023, 12:11 PMincalculable-yacht-10590
09/26/2023, 1:38 AMhappy-autumn-40938
09/26/2023, 4:33 AMid
field. If you want to track actual assignment events, you'll need to use the SDK's trackingCallback
to log the user's assignment (and their attributes) to a warehouse.incalculable-yacht-10590
09/26/2023, 6:00 AMhappy-autumn-40938
09/26/2023, 6:17 AMconst forcedBucket = await getBucketByUserId(id);
gb.setAttributes({
forcedBucket,
etc...
});
...or bake the value of forcedBucket into your template. Either way, it would be some sort of DB lookup under the hood.
Also note that doing your own bucketing limits your ability to control the test rollout using GrowthBook.white-fireman-22476
09/26/2023, 7:19 AMincalculable-yacht-10590
09/26/2023, 8:28 AMwhite-fireman-22476
09/27/2023, 3:41 PMhi @white-fireman-22476 i already set a new identifier type, but how to connect it with i set attributes?You need to create both the identifier type and the experiment assignment query: https://docs.growthbook.io/app/datasources#experiment-assignment-queries. Hopefully the default for the event-source type that you choose can just be modified to use your new identifier type.
do you guys provide the experiment directly or we need to create query to out data warehouse?When creating metrics we provide sample queries given the event-source type you selected when making your data source. They are provided as-is and may need to be modified to match your particular schema or to make them more performant.