Hello everyone! Do you recommend any tutorial to d...
# ask-questions
b
Hello everyone! Do you recommend any tutorial to do my first AB test with reactJS, with self-hosted GB? I’m having a hard time understanding the conversions. I am using
postgres
for the datasource and currently I have only one table (
viewed_experiments
), I have not found information regarding the database schema that should be used. thnks
f
Hi Marcos, how are you tracking the events? Are you using something like Rudderstack?
b
HI @fresh-football-47124, I don’t understand specifically what you mean, but currently in the frontend I have defined the following:
ExperimentsDomain.saveExperimentData
is a function that sends data to an internal API which saves the data in the postgres table, I’m a bit new to experiments, if I’m doing something wrong I’d appreciate it if you could tell me
Copy code
const growthbook = new GrowthBook({
  apiHost: "<http://localhost:3100>",
  clientKey: "sdk-a",
  enableDevMode: true,
  enabled: true,
  trackingCallback: (experiment, result) => {
    console.log({
      experiment_id: experiment.key,
      variation_id: result.variationId,
      user_id: getKey('user').id
    })
    // TODO: Use your real analytics tracking system
    ExperimentsDomain.saveExperimentData({
      experiment_id: experiment.key,
      variation_id: result.variationId,
      user_id: getKey('user').id
    });
  }
});