Sub topic 6
Excluding users and events
This chapter covers how exclusions work in the GA4 audience builder. You need an audience builder open in a property where you have Editor access. You should know how condition groups and scopes work from earlier chapters.
What an exclusion does
An include condition adds users to an audience. An exclude condition removes users who would otherwise qualify. Typical uses:
- Remarketing to cart abandoners and leaving out people who already bought.
- Analyzing "new visitors" and leaving out internal staff.
- Building a "lapsed customers" audience that removes anyone who purchased recently.
In the builder, you add an exclusion with Add group to exclude. The group sits beside your include groups. A user joins the audience only if they match the include logic and do not match the exclude group.
Temporary and permanent exclusion
An exclude group has a mode with two options.
| Mode | Behavior | Use it when |
|---|---|---|
| Temporarily exclude users when | Users are removed while the condition is true. If it stops being true, they can rejoin. | The disqualifying state can change. |
| Permanently exclude users when | Once a user matches the condition, they never rejoin this audience. | The disqualifying event is a one-way change. |
Temporary exclusion suits states such as "has an item in the cart right now". Permanent exclusion suits events such as purchase when the audience means "never converted".
With a permanent exclusion, the Excluded state has no exit back to Member.
Worked example: added to cart, did not purchase
Suppose your site sends add_to_cart and purchase events.
gtag('event', 'add_to_cart', {
currency: 'USD',
value: 29.99,
items: [{ item_id: 'SKU_123', item_name: 'Trail Shoes', price: 29.99, quantity: 1 }]
});gtag('event', 'purchase', {
transaction_id: 'T_1001',
currency: 'USD',
value: 29.99,
items: [{ item_id: 'SKU_123', item_name: 'Trail Shoes', price: 29.99, quantity: 1 }]
});To build the audience:
- In Admin > Data display > Audiences, choose New audience > Create a custom audience.
- In the include group, add the condition Event name = addtocart.
- Choose Add group to exclude.
- In the exclude group, add Event name = purchase.
- Choose the mode. For "never bought", pick Permanently exclude. For "has not bought since the last cart", see the next section.
- Set the membership duration, name the audience, and save.
A user who added shoes to the cart joins the audience. If that user later buys, the exclusion removes them, and your ads stop following someone who already converted.
Choosing temporary or permanent
The two modes give different results for this same audience:
- With permanent exclusion, a customer who bought once stays out forever, even if they later add a new item to the cart. This is right for a "first purchase" campaign. It is wrong for a store with repeat buyers.
- With temporary exclusion on
purchase, the user is removed only while the purchase condition is true. The condition's scope decides how long that is. A purchase in the current session blocks them for that session. A purchase at any time in the past (across all sessions) blocks them as long as the event stays in the audience's history. Test the behavior in your property rather than assuming it.
For repeat buyers, a common approach is to exclude purchase within the same session, so a customer is removed after buying but can return on a later visit.
Excluding events, not only users
Exclusion can work at two levels, and mixing them up is the most common mistake.
- A user-level exclude group removes a whole user from the audience when any of their activity matches.
- An event-level condition inside an include group filters which events count. For example, "pageview where pagelocation does not contain /blog" counts only non-blog page views.
The second case does not exclude users. It changes which events satisfy the include condition. A user with one blog view and one pricing view still matches, because the pricing view qualifies.
Excluding with parameters and user properties
Exclude groups accept the same dimensions as include groups. That includes event parameters and user properties, but only after you register them as custom dimensions. See the earlier chapter on custom dimensions if a parameter does not appear in the condition picker.
Suppose you send a user property for paying members:
gtag('set', 'user_properties', {
membership_tier: 'premium'
});After you register membership_tier as a user-scoped custom dimension, you can build "all visitors, excluding premium members" by including All users-style conditions (for example, any session_start) and excluding membership_tier = premium. The exclusion only works for users who have sent the property since you registered the dimension and since the tag change went live.
Event parameters work the same way. If you send a custom event:
gtag('event', 'select_plan', {
plan_name: 'pro',
billing_period: 'annual'
});you can exclude users who chose plan_name = pro from a campaign that promotes the pro plan. Register plan_name as an event-scoped custom dimension first.
Choosing the scope of an exclusion
Each condition inside an exclude group has the scope choices you already know: within the same event, within the same session, or across all sessions. The choice changes who gets removed.
| Scope | Exclusion applies to |
|---|---|
| Within the same event | Users with a single event where all listed parameters match together. |
| Within the same session | Users who matched in the current session only. |
| Across all sessions | Users who matched at any point in the audience's history. |
Use the narrowest scope that matches your intent. "Across all sessions" is the safest choice for "never purchased". "Within the same session" is better when you want to pause ads briefly.
Limits and common problems
- Audiences are not retroactive in the way people expect. A new audience fills with users who qualify from events after you save it, plus a lookback of up to 30 days in some cases. A permanent exclusion only recognizes matches from that period onward. A customer who bought two months ago may still enter a new audience.
- Consent affects matching. If a user declines analytics storage, GA4 may not see their events, so the exclusion cannot match them. Check this when buyers still appear in a remarketing list.
- Processing delay. A user can stay in an audience for a short time after the exclude event fires. Ads lists can take longer to update than the GA4 audience itself.
- Too many conditions slow down debugging. Add one exclude group at a time and check the audience's size after each change.
- Editing changes membership rules, not history. Changing an exclusion on a saved audience applies from that moment. Some edits may not be allowed once the audience is created, so you may need to create a new audience.
To check your work, compare three numbers in the audience's preview and reports: users who match the include group alone, users in the exclusion group alone, and the final audience. The final count should be close to the include count minus the overlap.
Exercise
You build an audience with the include condition "Event name = addtocart" and a second include condition "Event name does not equal purchase", intending to remove buyers. Buyers still appear. Why, and how do you fix it?
Show answer
A "does not equal" condition in an include group matches any user with at least one other event, and buyers have many other events. Remove that condition and add an exclude group with "Event name = purchase". Use permanent exclusion if buyers should never return to the audience, or temporary exclusion if repeat buyers should be able to rejoin after a later cart event.
Exercise
A store has many repeat customers. You want to remarket to cart abandoners but pause ads for a customer who bought in the same session. Which exclusion mode and scope would you choose?
Show answer
Use a temporary exclusion with the condition "Event name = purchase" scoped to the same session. A purchase removes the user for that session, and a later session where they add to the cart again lets them rejoin the audience. A permanent exclusion would lock out repeat buyers forever.