Advertisement
Content Moved? Use Search to Locate
Man working on computer in modern office, viewing photography website. Clean and tech-focused environment.

Should You Use a GA4 Hostname Include Filter?

Use a GA4 hostname Include filter only after you have identified every hostname that belongs in your reporting and confirmed the proposed rule in Testing state. It changes incoming data, not historical reports: excluded data is permanently unavailable in Google Analytics and BigQuery. It also does not filter Measurement Protocol events, so this is a targeted control—not a universal analytics cleanup setting.

This guide is for the website operator deciding whether to activate the filter. The decision is whether the hostnames your business needs will remain represented after the rule is applied, including subdomains and separately hosted checkout or booking services.

What the hostname filter does—and does not do

Google Analytics Help: Filter Web Hostname Traffic documents Include and Exclude operations, with exact, begins-with, ends-with, and contains match types. An Include rule keeps events that match its configured hostname condition and excludes those that do not. Google’s September 21, 2026 announcement says Include filters also automatically block events with empty hostnames. That behavior does not establish that every empty-hostname event is spam; investigate the source and your tagging before treating it as unwanted.

There is an important exception: Google says Measurement Protocol events are not filtered by this hostname Include filter. If you send events through Measurement Protocol, assess that stream separately rather than assuming the hostname rule governs it. Google’s announcement documents this exception.

Audit your hostnames before creating a rule

Start with the GA4 Hostname dimension over a date range that includes representative site activity. Record the hostnames in the data, then compare them with how the site actually works. Include legitimate subdomains and any separate checkout, booking, payment, or other service host that participates in the journey you measure. The business must decide which hosts are legitimate; an unfamiliar hostname is a prompt to investigate, not automatic proof that it should be excluded. See Google Analytics Help: Analytics Dimensions and Metrics for the Hostname dimension’s definition.

Next, review the property’s existing active data filters. Google Analytics Help: Data Filters says active Include only filters are unioned and applied as a group before active Exclude filters. In other words, multiple active Include only filters do not operate as an intersection; the combined active configuration matters, not just the new rule considered alone.

Also inspect your tagging. Google says GA4 populates Hostname automatically, but manually setting page_location overrides the automatically collected value. If your implementation overrides it, verify that it sends a full URL and investigate how that affects the hostname values you are using for this decision. The Analytics Dimensions and Metrics documentation describes this behavior.

Keep a short inventory before proceeding: each hostname you need, what part of the customer journey it serves, and the events you expect to see there. If a service’s role or hostname is unclear, confirm it with the person responsible for the site or integration before configuring an allowlist.

Create the filter in Testing state

You need an Editor or higher property-level role to create a hostname data filter, according to Google’s setup guidance. Choose Include if your goal is to keep events from approved hostnames and exclude other matching incoming data. Choose a match type that reflects the hostname you intend to allow: exact is the clearest choice when you have a specific hostname to match; use begins with, ends with, or contains only when the hostname pattern you need genuinely calls for it. Check the resulting match against your inventory rather than assuming a broader pattern is safe.

Leave the filter in Testing state. Google marks matching data with the Test data filter name dimension and advises allowing 24–36 hours before validation. Treat that interval as guidance, not a guarantee that every relevant host or enough activity will appear. If the property has little traffic, or a particular service is used infrequently, the test may not provide evidence about that part of the journey. See Google’s hostname-filter testing instructions.

Validate the test in an Exploration

Use a Free form Exploration to inspect the filter’s effects. Add Test data filter name, Event name, and Hostname as dimensions, and Event count as the metric. Use the test filter name to identify the matching test data, then break down event counts by hostname and event name. Google’s documented validation procedure uses this Exploration approach to show which hosts the filter affects.

Compare those results with your inventory and expected event flow. An unexpected hostname calls for investigation: verify whether it belongs to a real integration, a subdomain, or another source before deciding whether the rule should exclude it. A needed hostname that is missing from the test is not evidence that it is safe to omit; check whether the service generated relevant activity during the test window, whether tagging supplies the expected URL, and whether the match condition covers the hostname. Adjust the proposed rule or gather more evidence rather than activating it on an incomplete test.

Hypothetical example: a separately hosted checkout

Hypothetical: A small retailer’s main site is hosted at shop.example.com, while checkout runs at checkout.vendor.example. Before activation, the operator lists both hosts as necessary to the purchase journey. In the Testing Exploration, they look for event counts and event names under both hostnames, including the events they expect the checkout flow to generate. If the test shows the main site but not the checkout host, they should investigate whether a checkout session occurred and whether tagging and the hostname match are correct. They should not activate a rule that allows only the main site until they have evidence that it preserves the reporting they need. Seeing both hosts in the test is useful evidence, but the operator should still check that the relevant events appear where expected.

Weigh the permanent-data tradeoff

Google Analytics Help: Data Filters states that an Active filter applies to incoming data and makes permanent changes. Filters do not alter historical data, so activation will not repair past reports or backfill earlier periods. Excluded data is never available in Google Analytics or BigQuery. After activation, Google says filtering begins within 24–36 hours; that is not a guarantee that all effects will be visible at an exact time.

Because active Include filters are unioned as a group and applied before active Exclude filters, check the complete active configuration before deciding. If the filter passes your test and you accept the permanent loss of excluded incoming data, activate it and monitor the relevant hostnames and event counts afterward. If the test is incomplete, the host inventory is uncertain, or the reporting cost of an accidental exclusion is unacceptable, leave it in Testing state while you investigate.

For a site with multiple checkout or booking paths, Splinternet Marketing’s conversion-tracking service can help map the host inventory to event collection, implement a test plan, and keep the reporting reviewed as the customer journey changes.

Activation checklist

  • Have you inspected the Hostname dimension for a representative date range and documented the legitimate domains, subdomains, and service hosts?
  • Have you reviewed existing active Include and Exclude filters and checked whether tagging manually sets page_location?
  • Does the proposed Include operation and match type cover the hosts you need without relying on an unverified pattern?
  • Have you allowed 24–36 hours, then reviewed the Testing-state data in a Free form Exploration using Test data filter name, Event name, Hostname, and Event count?
  • Have you investigated unexpected or missing hosts and checked the events needed for important journeys?
  • Do you understand how the active filter set works together, and accept that excluded incoming data is permanently unavailable in Analytics and BigQuery, with no historical backfill?

Activate only when the inventory, test evidence, and permanent-data tradeoff all make sense for your property. If a hostname or event is still unexplained, keep investigating before making the exclusion active.

Sources

Editorial note: AI assists with research, drafting and automated checks. Sources are linked so you can verify the guidance. Platform requirements can change; confirm the details that apply to your setup.