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

worried-planet-2191

01/03/2022, 3:55 PM
This message was deleted.
f

future-teacher-7046

01/03/2022, 3:56 PM
Hi Mahesh. GrowthBook requires you to have an event tracking and data source already in place. For example, Mixpanel, Google Analytics, or Segment + Snowflake.
When instantiating the GrowthBook instance in the SDK, you pass in a
trackingCallback
function. In there you would track the event with whatever system you are using
So the SDK never communicates with growthbook.io directly. Instead, you track events into your data source and then growthbook.io queries the data source to pull out data and analyze the result
s

sparse-translator-60590

01/03/2022, 4:13 PM
Got it @future-teacher-7046, this helps a lot. So I would need to add the trackingCallback: attribute to the new Growthbook call
and then events will be sent to that service specifically, when I call growthbook.run()?
Is it possible to configure the snippet to use my own PostgresSQL as a data source?
(i.e., how do I send events from the snippet to my PG?)
f

future-teacher-7046

01/03/2022, 4:21 PM
There are a bunch of event tracking libraries and services you can use that can write to Postgres. Jitsu, Segment, Fivetran, Rudderstack, FreshPaint are some
s

sparse-translator-60590

01/03/2022, 4:21 PM
Ok @future-teacher-7046: I think I misunderstood the scope of the Javascript SDK. It is more clear now.
Thank you so much for your help.
15 Views