Hi there!
I see in the documentation that we have testMode: true available, but I can't really find any more information on what it does?
Ultimately I'm trying to see if I can enable GA only for production. So if testMode: true doesn't do it, is there a way to disable react-ga? Say based on a ENV VAR?
Thank you for your time!
Dimo
Yes testMode will let you do that. What it does is essentially prevent ga from being loaded or called. Instead all the calls are put in an array you can use for debugging.
I must have been a bit lazy in doc writing on this one.
Thank you @SimeonC for clarifying! I can confirm setting it to true doesn't send any tracking to GA!
When you say, _all the calls are put in array_, how can I access that array?
Thank you for your time!
Sorry for long delay, see here: https://github.com/react-ga/react-ga#test-mode
Most helpful comment
Sorry for long delay, see here: https://github.com/react-ga/react-ga#test-mode