Is it AWS read-only or Athena read-only?
# ask-questions
h
Is it AWS read-only or Athena read-only?
w
What are you referring to?
Without knowing anything I would say Athena read only as AWS refers to a bunch of different services some of which have nothing to do with reading or writing.
h
OK,thx😄
Now we have given all Athena permissions, but the query still shows that the permissions are not enough, I do not know what to do?
I mean linking data sources for analysis
img_v2_ff604d14-e166-461e-bd4f-fc1d3b21fbhu.jpg
img_v2_fd9c8b3e-3b27-47e3-b051-a4745a3ad8hu.jpg
w
Is this for self hosted or growthbook cloud? If the latter have you whitelisted the growthbook IP address?
h
self hosted
img_v2_47702815-6dac-436f-9d66-3830049cf7hu.jpg
img_v2_ab132b5a-6777-402b-8ce0-2512ef0cd0hu.jpg
w
Hmm, I'm not sure off hand. That does look like you are giving all the permissions and it must be frustrating it doesn't work. I'll think about it and if I have other ideas I'll let you know.
h
Ok, thank you
w
Where do you attach the growthbook-athena-policy to?
h
Hi, I have solved it, but I have a new problem. I can’t understand the analysis report
image.png
Does that mean on beats off?
w
Hi Wade. I'm glad you figured it out. What was your issue, as I am currently trying to improve the docs and it might help others.
On is currently beating off, but not by much and it is possible that in reality it is not better. You should ideally run the experiment longer, or perhaps it is just inconclusive. https://docs.growthbook.io/app/experiments#experiment-results-table-bayesian-engine
h
Hi James, now I have a set of experiments, I give different text content to a button component, and I want to use the ab test to know, buttonA or buttonB who gets more clicks, what should I do?
w
Are you referring to the test results in the image above or a different experiment?
h
This is the result of the experiment I set up, but I feel something is wrong

https://files.slack.com/files-pri/T01TK60DLAV-F05GW1G7ANQ/image.png▾

w
What do you think is wrong?
You should probably just let the test run longer until the risk of choosing On < 0.25% or the chance to beat control is > 95%.
h
I didn’t record the click button data, I don’t know how the click rate is calculated, I wonder is this question
w
You can look at your metrics tab to see the SQL used to generate the data.
h
Can growthbook know click-through rates even if I don’t record click data?
w
No. Growthbook doesn't keep any client data on its own. Everything is in your own data warehouse. The data from all the graphs are coming from querying your own data warehouse.
h
I want to create an ab test that tests whether buttonA or buttonB gets more hits. How do I do that?
w
You send an event to your event tracker in the onclick of your buttons. You create a metric in growthbook that selects those events summing them. You create a feature with a boolean value. In your code you read this feature value and show either button a or button b.
In the feature you add the make this feature an ab test button.
h
Let me understand, first I need to use growthbook’s trackingCallback to record that this experiment shows buttonA or buttonB. Then, I need to keep track of whether buttonA or buttonB was clicked. And then you sort out the data and give it to growthbook to analyze, right?
w
Right
h
Aha, I seem to understand. Let me try it out.Thanks
w
Sure thing. Good luck!
h
Hi,James.I have a new question,I can’t find the answer in docs. I have created a feature with a type of “number” using GrowthBook. Now, I have three values: 0, 1, and 2. I want to display different content based on these three values in React. How should I write it in React? “useFeatureValue” requires me to pass two parameters, the first one I understand is the feature key, and the second one is the default value according to the documentation, but once I set the default value, the value I get back will always be the default value. What should I do to get one of the three values at random
image.png
w
You would within Growthbook UI setup changeOrder feature ideally with an ABC test.
Based upon an id. Then make sure that you are setting that id via the SDK
h
Yes,I have created a changeOrder feature with Growthbook UI.And next I want get the ABC to show the different div.
if (featureValue === 0) {
content = <div>Show Content A</div>;
} else if (featureValue === 1) {
content = <div>Show Content B</div>;
} else if (featureValue === 2) {
content = <div>Show Content C</div>;
}
w
Great. Which id is the changeOrder feature based upon?
h
userId
w
And do you set the userId in growthbook SDK?
h
Yes,right
w
Well then that should do it theoretically.
If it is not, I'd suggest using the Growthbook dev extension to debug what is going on.
h
I think so, but now once I pass a second argument to useFeatureValue, I always get the value I passed in in my business code, even if I see a different value in growthbook’s debugger, I always get the same value back
image.png
The debug tools tell me that I now have the value 2, but in my code I just get the value 0 for ever
w
It looks like you are hashing by "id" not "userId" according to that screenshot
h
Is there something wrong with my use of useFeatureValue
ahh,yes,I misspoke, but that’s actually what I wrote
image.png
For the sake of testing, I used the timestamp as the ID
w
useFeatureValue should only need the key
h
But typescript warns me that two arguments are required😭
w
It looks like the image you posted earlier was calling getFeatureValue as part of the first argument
get rid of that and just use the key
h
image.png
What should I do?
w
do
const value = useFeatureValue('changeOrder, 0);
h
I did that, but it seems to keep giving me value 0
image.png
image.png
As you can see, I printed out the value 0, but the debugger told me it should be 2
w
What does
getFeatureKey('changeOrder')
return. Based upon what you are showing in devTools, you want it to equal
CHANGE_TYPEBAR_ORDER_SIT
const value = useFeatureValue('CHANGE_TYPEBAR_ORDER_SIT',0)
h
getFeatureKey just does some string concatenation
w
So does it produce the equivalent of what I wrote?
h
Yes
Maybe I should try passing a string directly?
w
yes try that.
const value = useFeatureValue('CHANGE_TYPEBAR_ORDER_SIT',0)
should get you what you need.
h
Use uppercase?
w
That is what shows in Growthbook dev extension
hrmm actually maybe the dev extension capitalizes it
h
ahhh, let me try it
w
yeah no it shouldn't be capitalized. It should be whatever you have it in the growthbook UI
h
image.png
w
That should be the one
h
It doesn’t seem to work. It keeps giving me 0
image.png
w
ah
h
image.png
w
can you show me your feature overview?
h
ummm, I’m sorry I don’t understand. What do you mean?
w
Your /features page
h
Show you how I set this feature?
w
The tracking key != feature key I believe
h
image.png
w
yeah thats the one you need
in that case
h
image.png
Combined with the screenshots of the code blocks I’ve uploaded, did I go wrong?😭
w
const value = useFeatureValue('change_typebar_order_sit',0)
h
Now currentValue should be 2, but I get value 0
image.png
w
A quick video chat?
h
Just a moment, my English is poor, let me find a partner to help me translate🙏
What conference software do you use?
w
Can just do it over slack
h
OK
w
now?
h
OK,but I don’t konw how to use slack open a video chat