busy-horse-73824
05/19/2022, 9:47 PMprehistoric-waitress-6977
05/20/2022, 3:19 PMbrave-manchester-11480
05/20/2022, 4:34 PMbrave-manchester-11480
05/20/2022, 11:01 PMquiet-state-72429
05/23/2022, 12:45 PMdefine("FEATURES_ENDPOINT", '<https://cdn.growthbook.io/api/features/key_prod_5926******fdba>');
$apiResponse = json_decode(file_get_contents(FEATURES_ENDPOINT), true);
$features = $apiResponse["features"];
// generate 100 fake requests and allow specific feature based on ID attribute.
for($i = 0; $i<100; $i++) {
$growthbook = Growthbook::create()
->withFeatures($features)
->withAttributes([
'id' => rand(1, 100)
]);
if ($growthbook->isOn("test-feature-ab")) {
echo "It's on! <br>";
} else {
echo "It's off :( <br>";
}
}
Its working fine, I’m getting On
and Off
for specific set of users and its totally random.
now, the question is that how can I feed those On/Off to the experiments, so that I can get report and statistics.
Note: I’m using PHP SDK.important-electrician-17322
05/23/2022, 10:58 PMuseFeature
is subscribed to updates so it won't re-render after setFeatures
is eventually called (which might be correct anyway so we don't flicker). wondering how y'all think about this, for static pages like that is the intent that we just bundle the features with our app? and for pages where we do want the feature to load from the growthbook api in the rendering path we just make sure the features are loaded before rendering?acceptable-insurance-37652
05/25/2022, 3:42 AMfeatures
list is read in an effect (React SDK). So in theory if I wanted to do more live feature/ a/b testing I could wrap this in a poller for example. I don't think I would need something as extreme as web sockets for realtime changes just yet.acceptable-insurance-37652
05/25/2022, 3:46 AMsetAttributes
would I then need to manually re call the api or is that part of the async action from setAttributesacceptable-insurance-37652
05/25/2022, 3:49 AMbrash-raincoat-88597
05/30/2022, 8:00 AMbrash-whale-8290
06/01/2022, 6:33 PMbored-forest-47521
06/03/2022, 8:22 PMsparse-accountant-63897
06/09/2022, 2:13 AMsparse-accountant-63897
06/09/2022, 2:13 AMbillowy-gigabyte-74590
06/09/2022, 3:13 PMacceptable-tent-71100
06/10/2022, 11:47 AMchilly-umbrella-90459
06/11/2022, 6:31 PMquick-pencil-56442
06/12/2022, 10:21 PMmillions-diamond-13295
06/13/2022, 2:32 PMclean-fountain-61698
06/14/2022, 6:00 PMfreezing-finland-88631
06/14/2022, 8:15 PM/organization/definitions
API endpoint fail, and I’m seeing this in the container logs:
Unexpected end of JSON input\n at JSON.parse (<anonymous>)\n at Object.decryptDataSourceParams (/usr/local/src/app/packages/back-end/dist/services/datasource.js:29:17)\n at Snowflake.setParams (/usr/local/src/app/packages/back-end/dist/integrations/Snowflake.js:11:36)\n at new SqlIntegration (/usr/local/src/app/packages/back-end/dist/integrations/SqlIntegration.js:17:14)\n at new Snowflake (/usr/local/src/app/packages/back-end/dist/integrations/Snowflake.js:9:1)\n at Object.getSourceIntegrationObject (/usr/local/src/app/packages/back-end/dist/services/datasource.js:69:15)\n at /usr/local/src/app/packages/back-end/dist/controllers/organizations.js:128:50\n at Array.map (<anonymous>)\n at /usr/local/src/app/packages/back-end/dist/controllers/organizations.js:127:38\n at Generator.next (<anonymous>)\n at fulfilled (/usr/local/src/app/packages/back-end/dist/controllers/organizations.js:5:58)","type":"Error","msg":"Unexpected end of JSON input"}
Per the docs I set NODE_ENV
to production
, and set a JWT_SECRET
and ENCRYPTION_KEY
. Could the fact that I saved the experiments without an encryption key when developing locally, and am trying to read those experiments in prod, be part of the issue?freezing-finland-88631
06/14/2022, 8:16 PMcrooked-iron-57426
06/16/2022, 1:06 PM/test/
page and several Features, some of which have conditions like page-path=/X/
and I'd like to pregenerate all variant who should apply to my given page. The rewriting / redirection would be done on runtime using next12 middlewares exactly like in the example.
Thanks in advancelively-belgium-36533
06/17/2022, 9:49 AMforceVariation
, and then i use useFeature
, i expect to get the force variation value, but i found it returns me the default value, not the forced variation value, then i check the source code.
i found in line 353: here the res.inExperiment
is false. is this a bug? or how can i get the forced variation value?bumpy-student-89073
06/18/2022, 1:17 PMbumpy-student-89073
06/18/2022, 1:18 PMorange-zoo-48432
06/18/2022, 5:30 PMpowerful-dream-22266
06/20/2022, 7:41 PMpowerful-dream-22266
06/20/2022, 7:41 PMbored-forest-47521
06/21/2022, 5:38 PM