Hello everyone! I have a task to create a JavaScr...
# ask-questions
h
Hello everyone! I have a task to create a JavaScript that detects if a GrowthBook test is running on a page, fetches the test parameters and stores them in a cookie that persists until checkout. This will allow me to accurately track the revenue generated by each test. I'm looking for the best way to implement this—specifically, the most effective method to interact with the GrowthBook's eJS vents on the page. Has anyone done something similar or have any advice on best practices? Any insights would be greatly appreciated!
h
Typically you just use whatever userId / session system you already have in place and pass that into both your GB SDK and your metric tracking events. Then when analyzing an experiment in the GB app, you can see the change in that metric per variation associated with the experiment.