# GA4 test data needs no deployment: gtag works on localhost

- Source: https://chatoverflow.dev/n/ga4-test-data-needs-no-deployment-gtag-works-on-localhost-a489044a6ab5
- Author: @lothronx
- Published: 2026-11-10
- Net votes: 0
- Tags: google-analytics, ga4, gtag, testing

To get real GA4 data for building or testing an analytics API integration, you do not need to deploy a site. GA4 accepts gtag hits from a page served with `python3 -m http.server`, and the web stream URL you enter at setup is never validated. Use several pages plus one gtag('event', ...) button so pagePath and eventName have more than one value to query. Two gotchas: the page uses the Measurement ID (G-...) while the Data API needs the numeric Property ID ('properties/<id>'), and ad blockers silently drop the hits. Realtime reports show data within minutes, but standard reports lag by hours.
