Referrals are the segment of traffic that arrives on your website through another source, like through a link on a third-party domain. Analytics automatically recognizes where traffic was immediately before arriving on your site, and displays the domain names of these sites as the referral-traffic sources in your reports.
To make sure your data includes only referrals in which you're interested, you can create a set of conditions that identify the domains whose traffic you don't want to identify as referrals.
When you create these conditions, Analytics evaluates events sent from your website and appends the ignore_referrer
parameter with a value of true
to every event that matches the conditions (ignore_referrer=true
). This parameter indicates to Analytics that the referrer should not be displayed as a traffic source.
The conditions are evaluated for every web page on which you have the Google tag.
Common uses
The following examples illustrate scenarios in which you would not want to identify traffic from a domain as referrals:
- Third-party payment processors
An ecommerce site that uses a third-party payment processor, and users return to your site after checking out on the third-party domain. - Website-managed interactions
Transactions that are managed through a website but involve different third-party domains, e.g. a password-recovery operation that sends an email to users and there is traffic from the email domain back to the website. In this context, the email domain is acting as an aspect of your business rather than as a source of traffic.
Why returning users from excluded domains still appear in your reports
- User A arrives at your site via a referral from Domain B before you add that domain to the Referral Exclusion List.
- That first session is attributed to Domain B.
- You add Domain B to the Referral Exclusion List.
- User A returns directly to the site, for example, via a bookmark.
- Because of the last-non-direct-click attribution model, this second session is also attributed to Domain B.
Note: The key event lookback window you choose also applies to session attribution.
Automatic self-referral detection
A self-referral is referral traffic that can originate from pages within your own domains. By default, Analytics doesn’t measure the source / medium as a new referrer if the traffic is self-referring rather than a no-referrer.
Additionally, Analytics will not identify traffic as referral when:
- The referring website matched the same domain of the current page or any of its subdomains (e.g. your own website).
- The referring website is a result of a cross-domain measurement setup, e.g. when a user navigates across domains that you have configured in your domains list and the current page contains the linker parameter
_gl
.
Example
To illustrate the self-referral exclusion feature, imagine a session on example.com referred by the source / medium “example.com / referral”. Since “example.com / referral” is considered a self-referral, Analytics would not count this as a new referrer.
Configure unwanted referrals
You can configure a maximum of 50 unwanted referrals per data stream.
- In Admin, under Data collection and modification, click Data streams.
Note: The previous link opens to the last Analytics property you accessed. You can change the property using the property selector. You must be an Editor or above at the property level to configure unwanted referrals.
- Click Web and then click a web data stream.
- In the web stream details, click Configure tag settings (at the bottom).
- In the Settings section, click Show all to see all available settings.
- Click List unwanted referrals.
- Under Include referrals that match ANY of the following conditions:
- Choose a match type.
- Under Domain, enter the identifier for the domain you want to match (e.g. example.com).
- Click Add condition to add another domain.
- Click Save.
Set ignore_referrer=true for individual events
You might need to ignore referrers only in certain situations. You can control when you want to ignore a referrer by appending the ignore_referrer
parameter to individual pages or events and setting it to true
. For example, to ignore a referrer on a specific page, add the parameter to the config
command:
gtag('config', 'G-XXXXXXX', {
ignore_referrer: 'true'
});