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•11mo ago
Message Not Public
Sign In & Join Server To View
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•11mo ago
Message Not Public
Sign In & Join Server To View
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.
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•11mo ago
Message Not Public
Sign In & Join Server To View