This might be a dumb question, is there

This might be a dumb question, is there a way to interact with zaraz API on dev or localhost? Without actually sending data to google analytics.
6 Replies
Unknown User
Unknown User•11mo ago
Message Not Public
Sign In & Join Server To View
squareclamp
squareclampOP•11mo ago
thanks, this will still send data to GA, I just wanted to log to console for debugging. Maybe the simpler thing might be to create a wrapper around zaraz API.
Unknown User
Unknown User•11mo ago
Message Not Public
Sign In & Join Server To View
Mackenly
Mackenly•11mo ago
Another alternative is to setup a seperate GA for staging/dev. I've done this before but not in Zaraz. You could do the same just configure your test zaraz on a different zone and load it manually. It would be neat if Zaraz had a staging/test mode with different settings (and ability to copy from prod) so that different things could be easily be tested.
BensTechLab
BensTechLab•11mo ago
I agree with @Mackenly Jones. Not only for Zaraz... but I have a fully development copy of my website with developer accounts for everything including Zaraz/GA4 but also payment processing Stripe, and user login Auth0. Dev site is a full test playground. 🙂 Just buy a 2nd domain name and deploy a 2nd copy of the site (for me its also in Cloudflare Pages, so its pretty easier to deploy another pages site).
Unknown User
Unknown User•11mo ago
Message Not Public
Sign In & Join Server To View

Did you find this page helpful?