Home › Blog › Fixing (not set), spam and duplicate purchases in GA4
Blog · Tracking & analytics

Fixing (not set), spam and duplicate purchases in GA4

(not set), spam traffic, duplicate purchases and your own visits pollute your GA4 reports. Where they come from and how to clean them up in one review.

Most pollution in GA4 comes from a handful of causes that Google documents itself [1]. (not set) means GA4 received no value, often because of a tag on the wrong trigger, incomplete UTM codes or an error in Consent Mode. You prevent duplicate purchases with a unique transaction ID, and you hide spam with report filters.

Payment pages, your own visits and multiple domains each need one setting. Whether you have your measurement reviewed by a Google Analytics agency or do it yourself: one fixed monthly check works better than one-off fixes.

Where do (not set) and Unassigned come from?

(not set) is the placeholder GA4 uses when it received no information for a dimension [1]. It is not an error in itself, but a signal.

The main causes of (not set) (source [1])
Where you see itCause according to GoogleWhat you do
Source and mediumThe Google tag in Tag Manager doesn't fire on the Initialization trigger, so session_start is missing [1]Put the Google tag on Initialization - All Pages
Landing pageThe session has no page_view, for example after a click following more than 30 minutes of inactivity [1], [2]Check which events start sessions without a page view
Google Ads dimensionsAccounts not linked, auto-tagging off, or traffic from an unlinked Google Ads account [1]Check the links and auto-tagging
CampaignManually tagged links with incomplete or incorrect UTM parameters [1]Always include source, medium and campaign
Various dimensions, after a banner changeErrors in Consent Mode [1]Review Consent Mode

Google names two Consent Mode errors: updating the choice with default instead of update, and still sending events with denied consent after consent has been given [1]. A denied ad_user_data can also cause (not set) in your traffic sources, because GA4 then doesn't use the Google Ads click ID as intended [3]. How to set the signals correctly is explained in Consent Mode v2 in practice: basic or advanced?.

Unassigned is not a value but a channel: GA4 uses it when no channel rule matches [4]. That happens when source and medium are (not set), or with a medium outside the rules, such as utm_medium=newsletter [1], [4]. Which values do work is explained in UTM codes explained: meaning and a consistent naming convention.

Spam and bots

GA4 automatically excludes traffic from known bots and spiders, based on Google's own research and the International Spiders and Bots List. You can't turn this off, and you can't see how much was filtered out [5]. You recognise unknown bots and spam by a sudden spike from one unknown source, sessions on a hostname that isn't yours, or sessions without engagement from the same country.

A filter on source or hostname at collection doesn't exist in GA4: there are only data filters for internal traffic and developer traffic [6]. So you hide spam with a filter in your reports or explorations. Google recommends report filters if you want to hide data without permanently deleting it [7].

Duplicate purchases

A purchase counts twice if the confirmation page reloads, or if two tags send the same event, for example a plugin from your webshop as well as Tag Manager. GA4 deduplicates purchases with the same transaction ID, but only for web streams and never with an empty ID [8]. Use your order number, without data that could identify a customer [8].

To track them down, build an exploration with the transaction ID as the row and the number of purchases as the value: an ID with more than one purchase is a duplicate. How to measure purchases properly from the start is explained in E-commerce tracking in GA4: how to measure your webshop.

Payment pages, your own visits and other domains

Payment pages. If a customer pays at a payment provider or their bank, GA4 can see their return as a referral, and the payment provider gets the sale [9]. Add those domains to the unwanted referrals in your web stream's tag settings, up to 50 per stream [9]. You can see which domains they are in Traffic acquisition after a test payment with every payment method.

Your own visits. In your web stream's tag settings, define your office IP addresses as internal traffic, and under Data filters create a filter that excludes it [7]. Leave the filter on Testing first and check it in an exploration: an active filter is permanent, and excluded data never comes back [7]. You can create up to 10 data filters per property.

Multiple domains. If your visitor goes to a booking module or payment environment on another domain, GA4 sees two users and two sessions unless you configure it [10]. With cross-domain measurement, under Configure your domains in the tag settings, GA4 passes the IDs on through the _gl parameter [10].

A monthly check

A lot of pollution starts at a single moment: with a new website, when a redirect drops the click ID or the UTM parameters [11], or when a tag disappears from a template. How to handle a migration is described by Bert in Migrating a website without losing SEO: the step-by-step plan. On top of that, go through these points every month:

  • Share of (not set) and Unassigned in Traffic acquisition. If it rises, look for the dimension and the date.
  • New or strange sources and hostnames, with spikes without engagement.
  • Purchases compared with your webshop, plus an exploration for duplicate transaction IDs.
  • Referrals from payment domains, especially after a change to your checkout.
  • Internal traffic and new domains: are your IP addresses still right, and is a new booking tool included in your cross-domain setting?
  • Changes over the past month to your site, banner or tags, next to every jump in your figures.

Rather have someone else do the first round? Data quality is one of the six points of the free tracking audit: duplicate transactions, (not set) values, spam traffic and missing UTM tags.

Frequently asked questions

What does (not set) mean in GA4?

That GA4 received no value for that dimension. For the landing page, that happens when a session has no page view. For source and medium, it happens among other things when the Google tag doesn't fire on the Initialization trigger, when UTM parameters are incomplete or when Consent Mode is set up incorrectly.

What is the difference between (not set) and Unassigned?

(not set) is an empty value in a dimension, such as source or landing page. Unassigned is a channel: GA4 uses it when no channel rule matches. A session with (not set) as source and medium therefore ends up under Unassigned, as does traffic with a medium that doesn't fit the rules.

Does GA4 filter out bot traffic automatically?

GA4 automatically excludes traffic from known bots and spiders, and you can't turn that off. Unknown bots and spam are not covered. Because GA4 has no data filter on source or hostname, you hide them with filters in your reports.

Why does GA4 count purchases twice?

Usually because the purchase event fires again, for example when the confirmation page is reloaded, or because two tags send the same event. Give every purchase a unique transaction ID: GA4 deduplicates purchases with the same ID, but only for web streams and never with an empty ID.

How do I filter my own visits out of GA4?

Define internal traffic based on IP addresses in your data stream and create a data filter. Set the filter to Testing first: an active filter is permanent, and excluded data never comes back. You can create up to 10 data filters per property.

Sources

  1. What the value (not set) means in your reports — Analytics Help, accessed 27 Sep 2026
  2. About Analytics sessions — Analytics Help, accessed 27 Sep 2026
  3. [GA4] How traffic source dimensions are updated — Analytics Help, accessed 27 Sep 2026
  4. Default channel group — Analytics Help, accessed 27 Sep 2026
  5. Known bot-traffic exclusion — Analytics Help, accessed 27 Sep 2026
  6. Data filters — Analytics Help, accessed 27 Sep 2026
  7. Filter out internal traffic — Analytics Help, accessed 27 Sep 2026
  8. Minimize duplicate key events with transaction IDs — Analytics Help, accessed 27 Sep 2026
  9. Identify unwanted referrals — Analytics Help, accessed 27 Sep 2026
  10. Set up cross-domain measurement — Analytics Help, accessed 27 Sep 2026
  11. Clicks and Sessions Discrepancy for Google Ads and Google Analytics: Troubleshoot — Google Ads Help, accessed 27 Sep 2026
·

Further reading

Blog · Tracking & analytics

Are your numbers right?