Automatically collected
- Setup needed
- No
- Examples
first_visit,session_start,user_engagement
Google Analytics 4 is Google's event-based analytics property type. What it measures, the four event types, how to install the Google tag, and the session timeout.
Google Analytics 4 (GA4) is the event-based property type in Google Analytics. It records interactions as events, such as page loads, clicks, and purchases. You install the Google tag on your site, then mark the events that matter to your business as key events.
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.
first_visit, session_start, user_engagementscroll, click, file_downloadpurchase, login, sign_upSessions are built from these events. Google's developer guide says a session's default duration is 30 minutes, and that you can adjust that timeout in the Google Analytics interface up to a maximum of 7 hours and 55 minutes.
Google's guide assumes you have created a Google Analytics account and property, and a web data stream for your website.
Paste it into the Google tag snippet. A Google Analytics web tag ID looks like G-XXXXXXXXXX.
Google says to place the Google tag snippet immediately after the opening <head> HTML tag on every page you want to measure.
Check your events and their parameters in the Realtime and DebugView reports. Google notes that DebugView needs some additional configuration before you can use it. Google also points to Tag Assistant to check that the tag is sending data.
<!-- Google tag (gtag.js) -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-XXXXXXXXXX"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'G-XXXXXXXXXX');
</script>Google's gtag.js guide says it recommends using Google Tag Manager to set up and deploy tags on your site. Pick one way to deploy each tag.
Google's developer guide defines an engaged session as one that lasts longer than 10 seconds, has 2 or more page views, or triggers a key event.
4 questions people ask next, answered from the sources on this page.
No. Google's gtag.js guide shows copying the tag snippet into your pages directly. Google recommends Tag Manager for setting up and deploying tags, but the guide does not make it a requirement.
Use the Realtime and DebugView reports. DebugView requires some additional configuration before you can use it.
Any event you decide matters to your business. Google's developer docs say key event is the current name for a conversion event.
A session's default duration is 30 minutes. You can change the timeout in the Google Analytics interface, up to 7 hours and 55 minutes.
The free audit reads robots.txt, sitemaps, status codes, canonicals, redirects and structured data.