Can I use GA4 and Universal Analytics together?

Applies to: Google Analytics 4 (GA4) and Universal Analytics (UA)
Last updated: May 2025
Problem
You want to know if it’s possible (or advisable) to run GA4 and Universal Analytics side by side, either during a transition period or for comparison purposes.
Solution
Yes, you can use GA4 and Universal Analytics on the same website at the same time. This is commonly referred to as dual tagging, and it’s a recommended approach during migration from UA to GA4. However, since Universal Analytics stopped collecting new data in July 2023, only GA4 will receive fresh data moving forward.
Use Cases for Dual Tagging
- Compare GA4 and UA data side by side before fully transitioning
- Recreate UA tracking behavior in GA4
- Preserve historical UA data while building up GA4 reports
- Train teams on GA4 while maintaining legacy familiarity
How to Set Up Dual Tagging
Option 1: Manual gtag.js Setup
- Add both tracking snippets to your website’s
<head>
section:<!-- Universal Analytics --> <script async src="https://www.googletagmanager.com/gtag/js?id=UA-XXXXXXXXX-X"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'UA-XXXXXXXXX-X');
// UA Property gtag('config', 'G-XXXXXXXXXX');
// GA4 Property </script>
Replace with your actual UA and GA4 property IDs.
Option 2: Google Tag Manager
- Use two separate tags:
- A Universal Analytics Pageview tag
- A GA4 Configuration tag
- Set both to trigger on All Pages
This setup gives you full control over what data is sent to each property and when.
What You Need to Know
- UA data remains available for read-only access
- New data is collected only by GA4 since July 2023
- UA Goals, Views, and Filters do not exist in GA4—you must rebuild these manually
- Running both tags does not affect performance in most cases
When to Remove Universal Analytics
You can remove your UA code once:
- You have fully recreated your events, conversions, and reports in GA4
- You no longer need to reference UA data in real time
- All stakeholders are trained and transitioned to GA4