An event allows you to measure a specific interaction or occurrence on your website or app. For example, you can use an event to measure when someone loads a page, clicks a link, or completes a purchase, or to measure system behavior, such as when an app crashes or an impression is served.
Types of events
The following types of events are collected automatically:
- Automatically collected events are events that are collected by default when you set up Google Analytics on your website or app.
- Enhanced measurement events are events that are collected when you set up Google Analytics on your website or app and enhanced measurement is enabled.
You must implement the following types of events in order to see them in Analytics:
- Recommended events are events that you implement, but that have predefined names and parameters. These events unlock existing and future reporting capabilities.
- Custom events are events that you define. Make sure you only create custom events when no other events work for your use case. Custom events don't show up in most standard reports so you need to set up custom reports or explorations for meaningful analysis.
How it works
Let's say someone clicks a link on your tagged website that takes them to an external website. The following illustrates what happens when the user clicks the link:
1 |
2 |
3 |
4 |
The user visits your website and clicks a link to an external website | Analytics receives the click event and surfaces the event and parameters in the Realtime report | Analytics fully processes the event | Analytics surfaces the data in dimensions and metrics used in reports, audiences, etc. |
See events in realtime
When an event is sent from your website or app, you can use the following to verify that Analytics has collected the event successfully:
Realtime report
DebugView report
Understand conversion events
In Google Analytics, a conversion is any interaction or occurrence that's valuable to your business. For example, a user purchasing from your store or subscribing to your newsletter are examples of common conversions. Any time you want to record a conversion, you simply mark an event that measures the interaction or occurrence as a conversion. Learn more
Understand event grouping
Most of the events that your users trigger on your website or app are not sent one at a time. Instead, most events are grouped together (or batched).
Events are not batched, however, in some circumstances:
- Conversion events are transmitted immediately, although they may be part of a batch
- Containers loaded in debug mode never batch events to facilitate the realtime experience
- Events that are held by your device are sent when a user leaves a page
- In browser environments that don't support the
sendBeacon
API, all events are sent immediately
Note: When a user's device goes offline (for example, a user loses internet access while browsing your app), Analytics stores event data on their device and then sends the data once their device is back online. Analytics ignores events that arrive more than 72 hours after the events were triggered.