G-XXXXXXX in the script URL
- What it does
- Names the stream the hit belongs to
A GA4 data stream is the flow of website or app data into a property. Where to find streams, the G- measurement ID, enhanced measurement and the 50-stream limit.
A data stream in Google Analytics 4 is a flow of data from a website or app into your property. Each web stream has a measurement ID that starts with G-, and a property can have up to 50 data streams, of which up to 30 can be app streams.
Four quick questions, then a straight answer.
From your answers, this is quietly costing you traffic and nobody has the hours to chase it. Scaplet finds every affected page, drafts the fixes and tracks how AI answers mention you.
A data platform shipped 46 fixes without a ticket.
This looks handled. Re-check after a redesign, a migration or a big content push; that is when it breaks.
Your site is small and you have the time. Work through the steps on this page, starting with the pages that get the most traffic.
G-XXXXXXX in the script URLgtag('config', ...)dataLayer<script async src="https://www.googletagmanager.com/gtag/js?id=G-XXXXXXX"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'G-XXXXXXX');
</script>Sign in with Editor-level access or higher on the property.
Under Data collection and modification, select Data streams.
Choose the Web tab and open the stream. The measurement ID is in the first row of the stream details.
On the stream's details page, the Enhanced measurement switch turns all options on; the settings icon edits them one at a time.
| Enhanced measurement option | Event | Fires when |
|---|---|---|
| Page views | page_view | Collected automatically, cannot be turned off |
| Scrolls | scroll | User first reaches the bottom of a page (90% depth) |
| Outbound clicks | click | Link to another domain, unless set up for cross-domain |
| Site search | view_search_results | Results page detected by query parameters such as q or search |
| Video engagement | video_start, video_progress, video_complete | Embedded YouTube video with JS API support |
| File downloads | file_download | Link to a common file type |
| Form interactions | form_start, form_submit | First interaction in a session, and submission |
From the Web tab in Data streams, copy the measurement ID.
View page source on your site and search for the ID. Seeing it in the gtag.js URL or tag setup means the snippet is installed.
Open DebugView and load a page; a page_view event should appear for your device.
1 questions people ask next, answered from the sources on this page.
Google states up to 50 data streams per property, and up to 30 of them can be app streams.
The free audit reads robots.txt, sitemaps, status codes, canonicals, redirects and structured data.