https://www.growthbook.io/ logo
#ask-questions
Title
# ask-questions
i

incalculable-cpu-12868

04/21/2022, 5:45 AM
Hello all, i was looking into growth book and the possible functionality it can provide for me to do API integration with this one. I have seen in the documentation that it is possible, but it is very concise to start with. Is there any way to perform AB testing using growthbook for data stored in some data source and being fetched using some API? consider a example, I was to see the variation in the sales when a product is being sold at different prices like one a 100 and another at 110.? Since this data will be fetched from database using some API, will it be possible to perform such testing using growthbook, if yes is there any documentation / guide where adding API for the features is provided!! Thanks!!
f

fresh-football-47124

04/21/2022, 6:04 AM
yes, there a couple of ways you can do that
1. Run the our SDK on the API and assign users there, and return the value you desire. The event tracking of which user saw which variation can be done from that API, or on the front end (the SDKs use the same hashing algorithms so the assignments will be the same) 2. Adjust the API path or add a query string to the API url with the variation of the feature flag, so that the API knows which value to return.
i

incalculable-cpu-12868

04/21/2022, 6:15 AM
Thanks @fresh-football-47124, I have few more doubts, I was trying to create a metric after connecting a datasource locally!! on navigating to experiments, it shows errors as it could not find certain tables : Am i supposed to create these experiment related tables in my database?
if yes, what should be the schema for them? i could not find any structure in the docs!!
and when you say assigning users there? what exactly do you mean, can you please elaborate? Can we directly toggle certain feature, lets say the price in my use case depending upon the user's attribute (let's say geographical location may be)??
f

fresh-football-47124

04/21/2022, 6:31 AM
sure - GrowthBook uses your existing data warehouse or database. To run the experiment reports, it needs to know where it can find information about what user saw which variation. So there is no set schema for this table. I can help you set it up more if you tell me a bit more about your tech stack
For your second question, assigning is done by taking the userId or some other user attribute (like anonymous id or session id), hashing it to a number, and then assigning them into your variations based on that number.
For location based feature values: Our SDKs evaluate the targeting locally - so you could set the location as a user Attribute, then in the feature on growthbook you can add targeting rules based on the countries, set the values. There are a few other ways to do this as well...
i

incalculable-cpu-12868

04/21/2022, 7:09 AM
@fresh-football-47124, yes, i will need some help in setting up the schema!! Also, can we have a use case where my data source is nosql (lets say mongo) and the database i am using to store experiment related information in an sql database (eg mysql)? if yes, i was thinking of creating a java application with which i can integrate with the API's (which will fetch let's say the price!!) and in this java project we will have the SDK which then talks to the growthbook and provides the analytics!! Am i connecting the dots correctly? Can this happen? But i could not find SDK for java!!
f

fresh-football-47124

04/21/2022, 7:12 AM
do you have any event tracking currently? such as mixpanel, segment, rudderstack, etc?
amplitude? google analytics?
The SDK for java is in development,
we have a Kotlin SDK, which technically should work
i

incalculable-cpu-12868

04/21/2022, 7:42 AM
@fresh-football-47124, i will get back to you on your question!! yes Kotlin SDK should work as well!! do we have downloadable SDK jar?
if yes, can you please share the same!!
Hello @fresh-football-47124, We track events in Firebase, Clevertap, & MoEngage!!
f

fresh-football-47124

04/21/2022, 9:34 AM
the easiest way with that stack is to push events from Firebase to BigQuery https://firebase.google.com/docs/projects/bigquery-export and then in the SDK you would fire experiment viewed events to firebase. GrowthBook would then query the BigQuery table to pull the results of the experiment, that way all your existing metric data will already be there.
i

incalculable-cpu-12868

04/21/2022, 9:38 AM
thanks @fresh-football-47124, okay that solves the requirement for metric data, but for the experiment specific data which i was asking at the beginning, we will still need to have that schema inside our db?
regarding these tables!!
@fresh-football-47124, do let me know if we could connect for sometime. Thanks!!
Hello @fresh-football-47124, In the documentation it was mentioned that we can also provide manually instead of picking it up from some source. I could not find that option on the growthbook UI. How can i achieve this?
f

fresh-football-47124

04/21/2022, 3:52 PM
Ya, manual is not a data source, but you can set it when creating metrics and experiments
i

incalculable-cpu-12868

04/21/2022, 3:53 PM
okay, got it!! thanks
@fresh-football-47124, once i select Manual here, From where exactly i can provide the data?
I cant find any option !!
f

fresh-football-47124

04/22/2022, 6:26 AM
it will be on the experiment page
i

incalculable-cpu-12868

04/22/2022, 6:33 AM
while creating experiment? cant find manual option!!
f

fresh-football-47124

04/22/2022, 6:39 AM
up top, click on new draft
i

incalculable-cpu-12868

04/22/2022, 6:44 AM
okay, but still cant find from where i can manually upload the data!!
f

fresh-football-47124

04/22/2022, 6:49 AM
let me check
i

incalculable-cpu-12868

04/22/2022, 7:26 AM
okay!!
f

fresh-football-47124

04/22/2022, 7:34 AM
so, I'm not sure whats happening
when you start a manual experiment
you should see a 'results' tab
and then clicking update, gives you this form:
oh, ya, you need to click 'start'
i

incalculable-cpu-12868

04/22/2022, 7:37 AM
yes, I started it and it is coming up now!!
Thanks @fresh-football-47124!!
can you provide me the schema structure for experiment related tables which is needed to be created in the DB?
f

fresh-football-47124

04/22/2022, 7:44 AM
we made it very flexible - there are 4 columns you need for the experiment exposure information: • userId (or some equivalent) • experimentId • variationId • timestamp
but there is no set schema - we recommend you use some event tracking like RudderStack or Segment or Jitsu
i

incalculable-cpu-12868

04/22/2022, 7:53 AM
as i mentioned we track events in firebase, and that can be pushed to big query, for experiment specific data, we will have to do an integration with SDK and push that to firebase !! and growthbook will fetch the same from big query!! is this correct?
f

fresh-football-47124

04/22/2022, 8:19 AM
yes
i

incalculable-cpu-12868

04/22/2022, 8:21 AM
okay, thanks!!
f

fresh-football-47124

04/22/2022, 8:24 AM
there is a
trackingCallback
that you can fire the event to firebase
in our SDK
i

incalculable-cpu-12868

04/22/2022, 8:34 AM
okay, will look into it!!
10 Views