A Google Analytics 4 setting lets you collect analytics.js hits as events in your Google Analytics 4 property
You are viewing a legacy article about Universal Analytics. Learn more about Google Analytics 4 replacing Universal Analytics.
If you collect data for a Universal Analytics property and a Google Analytics 4 property (via dual tagging with analytics.js and gtag.js), you can use a single setting in your Google Analytics 4 property to automatically capture the following Universal Analytics hits:
- Event hits (i.e. Category/Action/Label events that you collect using analytics.js)
- Timing (load-time events)
- Exceptions
This feature does not support Custom Dimensions and Metrics, Enhanced Ecommerce data, or User-ID. If you rely on these capabilities in your Universal Analytics property, we recommend updating your instrumentation in gtag.js or Google Tag Manager to log the necessary Google Analytics 4 fields.
While this setting lets you easily capture these three hit types as events, our recommended best practice is to update your code to capture that behavior using the Google Analytics 4 data model. Learn more
Set the option in Google Analytics 4
You should set the following option as soon as you create your Google Analytics 4 property.
- In Admin, under Data collection and modification, click Data Streams.
- Click Web and then click a web data stream.
- In the web stream details, click Configure tag settings (at the bottom).
- In the Settings section, click Show all to see all available options.
- Enable Collect Universal Analytics events.