Creating Web Area Segments with Google Analytics
Legacy content
This page is for Universal Analytics (UA). Find a page like this for Google Analytics 4 (GA4)
EPA content related to Google Analytics is changing.
Google's legacy platform, Universal Analytics (UA), will reach end of life in mid-2023 with a one-time extension for contracting clients such as EPA until July 1, 2024. See KB article.
In these Web Analytics pages, content for Universal Analytics is marked "Google Universal Analytics (legacy)."
Content for the new platform, Google Analytics 4, is marked "Google Analytics 4 (GA4)."
With the exception of some standard metrics like Pageviews, which you can find in the All Pages Report, the quickest way to access metrics for a specific Web area or subsite is by creating and applying a custom segment for that Web area. You can then apply this segment to any report within the Google Analytics (GA) interface.
On this page:
What are GA Segments?
Segments are similar in form to basic include/exclude filters, but not in function. Segments allow you to quickly access data for a predefined set of Sessions or Users, which basic include/exclude filters cannot do.
Segments essentially say one of the following:
- Find all the sessions that match condition X, and show me all the data for those sessions.
- Examples:
- Find all the sessions that resulted from someone clicking a link on site X (source = X.com)
- Find all the sessions that came from mobile phones (device category = mobile)
- Find all the sessions that came from California (region = California)
- Examples:
- Find all the users who match condition X, and show me all the data for their sessions.
Note: This type of segment can only cover 90 days at a time. GA looks for a user who matches condition X, and then gives you session data for the first session where condition X was matched, followed by all the other session data for that user - whether the following sessions matched condition X or not.- Examples:
- Find all the users who saw page X (page = X)
- Find all the users who searched for "lead" in our internal search box (search term = lead)
- Find all the users who downloaded a file (event category = download, event label = file path, such as below)
https://www.epa.gov/sites/production/files/2014-02/documents/lead_in_your_home_brochure_land_b_w_508_easy_print_0.pdf
- Examples:
-
You can also apply segments to a dashboard! So you could look at the data in any existing dashboard, and then apply a segment to get a subset of the data in that dashboard. The dashboard widgets will still be defined the same way - the segment won't add new pages to each widget - instead some data will be removed if it doesn't match the conditions in the segment.
Sample Custom Segment
To better understand how segments are created, open the EPA Enterprise View and click on the box labeled “Add Segment,” located at the top of any report, directly above the data graphs.

Click on “New Segment.”

- Click on “Conditions,” and add a filter for your Web area, using the dimension, Page.
- Set up the filter like this:
Filter = Sessions, IncludeBehavior > Page > Contains > epa.gov/leadNote: For more complex filters, you can use Regular Expressions (choose "matches regex" instead of "contains").
- Once your filter is ready, click “Preview” to make sure it is working. Many custom segments represent a very small percentage of traffic.
- Finally, name your custom segment and click “Save.”

Including All Appropriate Aliases
When creating a new segment, it is important to include any and all aliases. This is done the same way you would for include/exclude filters.