Lesson 2 of 7
How A Tag Sends Data
A tag's job is to send a request to a destination with some parameters. Under the hood that request takes one of a few shapes, but the idea is always the same: encode the data into a URL or body and send it to a collection endpoint.
Common shapes
- A tracking pixel, a tiny 1x1 image whose URL carries the parameters.
- A fetch or sendBeaconsendBeaconA browser API that reliably sends a small payload to a server even as the page unloads, used by GA4 to prevent lost hits. request, used by modern tags like GA4 to
/g/collect.
https://www.google-analytics.com/g/collect ?v=2&tid=G-XXXX&en=purchase&ep.currency=USD&epn.value=49
You can watch these in the browser's Network tab: filter for the destination's endpoint and you will see one request per hit, with the event and parameters in plain sight.
Key takeaway
A tag encodes data into a request to a destination endpoint. The Network tab shows exactly what left the browser.