brainy-honey-94290
02/15/2023, 6:04 PMpostgres
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. thnksfresh-football-47124
brainy-honey-94290
02/15/2023, 7:14 PMExperimentsDomain.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 meconst 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
});
}
});