This message was deleted.
# announcements
w
This message was deleted.
h
If you want to fetch dynamic features from the GrowthBook server then your PHP config must be set up to perform HTTP fetching. (You'll also run into a similar issue if you want to fire any analytics tracking callbacks). However, if you are ok with pre-baked (permanent) feature definitions, you can manually set them in code: https://docs.growthbook.io/lib/php#withfeatures-method Alternatively (additionally?), you could look into front-end tests using JavaScript.
b
I want to use this for AB test
h
Typically features can reference AB test experiments. However, you can also set manual (hard-coded) experiments: https://docs.growthbook.io/lib/php#inline-experiments
if your AB Test experiments are front-end specific (i.e. visual editor or similar), you can just use the JavaScript SDK if you like
b
It's backend related
So it will split into 50%-50% ?
I tried this, I am always getting the first item from the given set
h
You can choose the number of variations and the split percentages as you see fit. You will need to provide a unique user id (ex: sessionId) to the SDK in order to randomize the variation. The bucketing is deterministic (users always stay within their assigned variation)
b
So will it store something to files to get the correct value after applying the percentage?
Or it is juts a random?
h
nope, it's deterministic hashing which always results in the same variation for any specific user id.
b
got it.
And it run locally so no api call needed to Growthbok ?
h
Correct, assuming you’re ok with manually setting the experiment definition
b
yes thanks it helped me a lot as we are using WP engine and the HTTP client is disabled there.
🙌 1
144 Views