Noticias

A Step-By-Step Guide To Creating Segments And Audiences In GA4 With Examples


Google Analytics 4 (GA4) comes with a more flexible audience builder and offers more advanced audience creation capabilities than Universal Analytics (UA).

GA4 also takes a different approach to measuring screen views compared to Universal Analytics.

Instead of measuring screen views in separate properties for mobile and web, GA4 combines data from both web and app views into a single property.

This means that audiences can be created based on a user’s entire journey across multiple devices, which makes it possible to create more complete user profiles.

What Are Audiences?

Audiences refer to subgroups of users that can be used for both analysis and advertising purposes.

These groups can be created based on a variety of factors, including dimensions, page views, user properties, and events (or their sequences) that are relevant to your business.

It’s important to note that, as new user data is continuously collected in GA4, audiences are automatically re-evaluated.

What Are Segments?

Segments refer to a part of data that meets certain criteria and can be analyzed separately from the rest of the data.

Rather than analyzing data from all visitors, segments allow you to separate specific groups of users and compare their behavior to the rest of the data.

For example, you can compare the behavior of users from the United States to the behavior of all users, or mobile users to desktop users, and get deeper insights.

Segments Vs. Audiences

When you create a segment, you can choose to build an audience based on a segment – but these two features are different. You can’t use segments in standard reports, but you can use audiences.

Segments are available only in exploration reports, while audiences are not.

Audiences can be used in Google Ads remarketing campaigns, but segments can’t.

Most importantly, segments are retroactive, but audiences aren’t, as audiences start collecting information from the moment of creation.

How To Create Segments

In GA4, navigate to Explorations > Create a New Exploration.

There are three types of segments you can create:

  • User segment: Includes all events associated with users who satisfy a specific set of criteria.
  • Sessions segment: Includes all events associated with those sessions that match the set of criteria.
  • Event segment: Includes only specific events that meet a set of criteria.

Let’s dive into how each type of segment works with a simplified model.

Let’s say the user who visited the website performed the following actions during the first session:

  • Page view.
  • Submitted form.
  • Watched a video.

On the second session the next day, the same user performed these actions:

  • Page view.
  • Page view.
  • Watched a video.
  • Clicked.

If we create a user segment with the condition that the user submitted a form, it will contain data from both sessions because we tell GA4 to include all data that belongs to that user.

If we build the sessions segment with the condition that during the session, the user submitted a form, it will contain only data from the first session because we told GA4 to contain data only from sessions where one has submitted a form.

If we build a session segment of when someone watched a video, it will have data from both sessions because the user watched a video during both sessions.

And finally, if we create an event segment for times when the user clicked a link, it will contain only click event data from the second session.

While it may seem like a lot of information and hard to swallow, don’t worry; you will gradually understand all of these as you start using it.

Now, let’s dive into the segment builder UI of GA4, which is the same one we will be using for building audiences.

Get To Know Segment Builder UI In GA4

Here are some of the features to know about within segment builder:

  • OR/AND conditional logic operators can be used to apply multiple criteria at the same time in the groups.
  • Sequence is available only in user segments and can’t be configured for session or event segments. You can use it to know how many users subscribe after visiting your home page.
  • You can apply time constraints to your sequential segments. An example use case would be to know how many users visit your subscribe page and sign up within five minutes, or how many users visit your product page and add it to the cart within five minutes.
  • By checking the “Build Audience” checkbox, you can create an audience from that segment too.
  • “Exclusion group” is a valuable tool that allows you to refine your segment or audience by excluding specific users. For instance, you can create an audience comprising individuals who clicked the ‘Add to cart’ button but exclude those who have already made a purchase. This enables you to develop a targeted audience for your remarketing campaign in Google Ads, specifically catering to those who expressed interest in your product but didn’t complete the purchase.
  • Group level scoping: 1. across all sessions, and 2. within the same session within the same event. Which applies to all conditions in the group. Please note that you can apply specific sequence level scoping “across all sessions” and “within the same session.” Note that “across all sessions” scoping is available only in user segments.

Now, let’s explore a few examples of each type of segment so we can understand how they work.

Example Of A User Segment

At SEJ, we have sign-ups, and we are interested in how long it takes a user to sign up for our newsletter after landing on our article pages.

For that, we should build a segment of users who signed up for our newsletter, which is directly followed by a page_view event within 10 minutes.

For that, we choose “first_visit” as an event.

If you want to apply a time constraint to a specific step, you can utilize the time constraint option within the sequence. However, in our case, we have chosen a sequence global time constraint, which means that it applies to all steps within the sequence.

What we’ve found from this segment is that 478 out of 1302 subscribers (37%) subscribe within 10 minutes when they visit the article page.

If you have a shop, you can build a segment of those who purchase within a day after visiting a product page.

There are an infinite number of possibilities for how you can use this, and I would like to emphasize the fact that the new segment or audience builder of GA4 is very flexible and powerful compared to Universal Analytics.

Unfortunately, as you build a segment you can’t share it across explorations, and you need to create it again. There is a workaround you can apply to duplicate exploration if you need the same segment.

Basically, you can create an empty exploration with all the segments you might need. Then, whenever you need a new report, you can duplicate the exploration and utilize the segments within the copied version to avoid creating them each time.

Here are a few ideas of segments you may need to use for a users segment:

  • User Acquisition: Understand user behavior from different acquisition channels (organic search, paid ads, social media, email marketing).
  • Cohort Analysis: Compare engagement, retention, and conversion rates between new and returning users.
  • Customer Lifetime Value (CLTV): Identify high-value users based on revenue, order value, and purchase frequency.
  • Demographic Analysis: Segment users by age, gender, location, or interests to personalize marketing strategies.
  • Churn Analysis: Identify and re-engage users who have churned via remarketing campaigns.

Example Of A Session Segment

While user segments are valuable for analyzing long-term behavior and user characteristics, session segments provide a more focused and contextual analysis of user interactions within a single session.

Sessions segments are the best choice for content engagement analysis type of reports. By using session segments, you can analyze how users engage with different types of content on your website or understand user behavior based on referral sources.

Session segmentScreenshot from GA4, May 2023

In the sessions segment, everything is the same, but it no longer has:

  • “Across all sessions” scope.
  • Sequences.
  • Time constraints.

Let’s build a segment of users who arrived at our website from social.

Sessions segment of social trafficSessions segment of social traffic.

Note that I used “session source” equal to “social” with condition OR of page referrer with regexp match.

.*(?:facebook\.com|instagram\.com|twitter\.com|linkedin\.com|pinterest\.com|youtube\.com|t\.co|lnkd\.in).*

Here are a few ideas for how you can use session segments vs. users:

  • Content Engagement: Analyze sessions where users interacted with specific content types.
  • Campaign Performance: Evaluate sessions that originated from specific marketing campaigns or channels to understand how effective your marketing efforts are.
  • Feature Engagement: Detect sessions where users actively engage with specific features on your website, such as adding items to a wishlist, using a live chat, etc.
  • Conversion Funnels: Analyze sessions that progress through key steps of your conversion funnel, from initial engagement to goal completion, helping you optimize the user journey.

Example Of An Event Segment

Event segments are subsets of events triggered on your website or app.

With users and session segments, you may already feel you have all that you need, so why would you need event segments? Well, event segments provide a more targeted and specific analysis compared to session-based or user-based segments.

They allow you to look into specific actions users perform on your website and optimize the user experience.

As an example of how they can be used, let’s create a scroll depth event segment. By analyzing users who reach certain scroll depth thresholds, you can identify engaging pages, optimize content layout, and improve overall user engagement.

Event segment of scroll depth 50%Event segment of scroll depth 50%.

In our example, we want to see data from users who scrolled 50% of the page and noticed from scoping that only “within the same event” was left.

The granular scroll depth tracking we have requires a custom setup which we will cover in the next guides. On your end, if you don’t have it set up you can just use the  “scroll” event without the custom parameter “percent_scrolled.”

Here are ideas on when you can use events segments vs. users and session segments.

  • Clicks Events: Create a segment based on click events, such as “Add to Cart” or “Submit Form.” This allows you to analyze sessions or users who actively engage with your calls to action and measure the effectiveness of specific call-to-action buttons.
  • Video Engagement: You can build a segment based on events, such as “video_start,” “video_progress,” or “video_complete.” This segment allows you to analyze sessions or users who engage with video content on your site or app.
  • Custom Interactions: Set up custom event tracking to create segments based on specific interactions relevant to your business, such as social media shares or error tracking, to help you identify and analyze sessions or users who encountered issues.
  • Error Tracking: Create a segment based on error events, such as form validation errors, broken links, or server-side errors. The advantage: event segments focused on errors help you identify and analyze sessions or users who encountered issues, enabling you to improve error handling, fix broken elements, and enhance overall website or app functionality.
  • Interaction with Dynamic Content. Analyze sessions or users who interacted with dynamically loaded or personalized content elements, e.g., image carousels, related articles, or personalized offers.

As we learned how to use segment builder in UI, we can create an audience easily.

How To Create Audiences

The easiest method is to create audiences right from segments by checking the checkbox to build an audience.

Alternatively, you can access it under the Property menu.

AudienceAudience.

As an example, we will build a user audience of those who abandoned sign-up form submissions in order to target them via Google Ads remarketing campaigns.

We used the event “form_start” but excluded those who submitted a form.

Let’s dive into a few new options you have in audience builder.

What Is Membership Duration Setting?

It is the period of time that a user remains a member of an audience after they meet the criteria for inclusion. It allows you to define how long a user should stay in the audience before being automatically removed.

Based on your remarketing campaign’s needs, you may need to set it to different values.

For example, you may want to build an audience of users who were interested in your product in the last 15 days and advertise to them.

What Is Audience Trigger?

Audience trigger is a new feature in GA4 that lets you trigger a custom event when a new user enters into an audience. It allows you to build user acquisition conversion by marking the event as a conversion.

You can build an audience persona by a number of conditions – for example, users who read three articles on the topic of “Marketing” – name it “Marketers,” and trigger the custom event “marketer_acquisition.”

As you run certain campaigns to bring traffic to your blog, you can use marketer_acquisition conversion as a KPI to measure how effective your campaign was in attracting relevant traffic to your website.

The checkbox “Log an additional event when audience membership refreshes” is self-explanatory, and it is up to you to decide.

This may be useful for e-commerce, as when we have users who are interested in a product in the last 15 days and removed from the audience as time elapses, you may want to retrigger it when they return and are interested again, say, 30 days later.

Conclusion

With all the challenges GA4 brings, it also has big advantages you can use.

Audience-based conversions are vital KPIs for publishers to know whether they are attracting an Ideal Customer Profile (ICP) audience, or just random visitors.

In Universal Analytics, this wasn’t available – but with GA4, it is.

Also, time-based constraints let you build segments and open new ways to perform behavioral analysis. For example, you can create a segment of users who made a purchase within the last month.

This helps you focus on recent user interactions and understand current behavior patterns.

More resources:


Featured Image: Vitalii Vodolazskyi/Shutterstock

hola@juanrecio.com

Author

hola@juanrecio.com

"¡ALERTA! El Error Fatal que Está Saboteando tu Éxito (Y Cómo Solucionarlo) ⚠️"