Converting Universal Analytics Views, Segments, and Goals to Google Analytics 4

May 07, 2023

Google Analytics 4 (GA4) is the newest version of Google Analytics that offers an improved measurement model, more powerful data controls, and better insights into user behavior across different platforms.

If you are currently using Google Universal Analytics (UA), you’ll have to migrate existing configurations to GA4 — and soon! Universal Analytics will stop collecting data at the end of July 2023. In this blog post, we will outline specific steps for migrating Views, Segments, Goals, and Events from Universal Analytics to Google Analytics 4.

Migrating Views from UA to GA4

In UA, Views allow you to create filtered views of your data that can help you gain deeper insights into specific segments of your audience. Views have been eliminated in GA4, however. You have several options for replacing views in GA4: Most likely, Data streams or Data Filters will be used in place of your previous views configuration.

If you were using views for more granular views of your data, you’ll likely need to use Custom Reports or Explorations.

You can see a rundown of Views-related features and how they map to GA4 features in the documentation for views-related features in GA4

Using Data Filters to Replace Views in GA4

Data filters are useful for replacing UA views that were set up to exclude specific traffic — e.g. internal traffic or developer traffic. If you were using views to do something more detailed with your data, you’ll likely want to use custom reports or explorations as discussed below.

Here are the steps to use GA4 Data Filters instead of UA Views to filter internal traffic:

1. Log in to your Google Analytics account and navigate to the Admin section.
2. In the Property column, click on “Data Streams”.
3. Select the data stream that you want to apply a filter to.

Choosing a data stream in Google Analytics 4

4. Click “Configure tag settings”

Configure tag settings options in GA4

5. Click “Show all” in the top-right corner

GA4 Tag settings 'show all' button

6. Click “Define internal traffic”

GA4 all tag settings

7. Click “Create”

Create button for new data filter in GA4

8. Enter a name for the rule, e.g. “Office Traffic”
9. Enter the IP address you’d like to define as “internal”. If you’re excluding just a single IP address, change “match type” to “IP address equals”

Filtering an internal IP address in GA4

You can generally leave the traffic type as internal unless you need to report on multiple internal traffic types. See the GA4 documentation for filtering internal traffic for more details.

10. Click “Create” in the top-right corner of your screen

Migrating UA Segments to GA4 Audiences

In UA, Segments allow you to create subsets of your data based on specific criteria, such as user behavior, demographics, or traffic sources. In GA4, you can continue to use segments within explorations, but it’s likely that you’ll want to convert your segments to audiences, which are collections of users who share common attributes or behaviors.

Here are the steps to create a GA4 audience for what was previously a universal analytics segment for users in the state of New Jersey.

1. Log in to your Google Analytics account and navigate to the Admin section.
2. In the Property column, click on “Audiences”.
3. Click on the “New Audience” button.

New audience button in Google analytics 4

4. Click “Create a custom audience” under “Start from Scratch”

Create custom audience button in GA4

5. Under “include users when…” start typing the criteria you’d like to filter users by. I’m filtering by region, so that’s what I typed:

GA4 filter audience by region

6. Click “Add Filter”
7. Give your filter a name by typing into the top area where it says “Untitled Audience”.
8. Choose the type of filter you’d like to use (e.g. “contains”) and enter the value. For me this was “contains New Jersey”

GA4 audience filter by New Jersey

9. Click “Apply” in the filter box
10. Click “Save” in the top right of your screen

You can now use that audience as a custom filter in your reports, or you can simply choose to apply that audience group to any existing report by clicking the “All users” button in the report and changing the audience name to “New Jersey Users”:

GA4 Change Audience Filter

Converting UA Goals to GA4 events

In UA, Goals allow you to track specific actions that users take on your website or app, such as filling out a form, making a purchase, or watching a video. In GA4, Goals have been replaced by Conversion events, which are similar to Goals but offer more advanced tracking capabilities.

Let’s take a look at taking a UA goal of “contact form submitted” and adding it as a GA4 conversion event.

1. Log in to your Google Analytics account and navigate to the Admin section.
2. In the Property column, click on “Events”.
3. Click “Create Event”

GA4 create event button

4. Enter an event name, using only letters, numbers, and underscores. My event name is “contact_form_submission”.
5. Enter the criteria for the event, which should be very similar to the criteria for your UA goal. My UA goal was a page view to to the /thank-you page, so I’ve updated it to trigger when the page_location parameter “contains” /thank-you:

GA4 Creating a New Event

6. Click “Save”
7. Exit out of the custom events screen by clicking the “X”
8. In the list of events, find your new event and click the “Mark as Conversion” toggle next to your event:

GA4 Mark event as conversion

Your event will now count as a “conversion” in your reports!


A lot has changed from Universal Analytics to GA4, but with the right steps and guidance, you can make a seamless transition. By following the steps outlined in this post, you should be able to migrate your Views, Segments, and Goals from UA to GA4 without too much difficulty, though I recommend referring to the official documentation if you get stuck or need additional details. Good luck with your conversion!