Referrer Exclusion for GA4 and About Referrer Spam
The other day, I found a new referrer spam. So I did referrer exclusion in both Google Analytics Universal Analytics and GA4. It seems that referrer exclusion was not possible in GA4 before, but now it is easy to do, so I will explain.
Referrer spam we found this time
This time the spam was leading to a site gammatraffic.com
(don't access it!).
Since the organic traffic was increasing in one of the site I manage, so I checked the keywords and found that www.trafficfit.club
and www.trafficcity.club
were listed at the top.
Obviously, something is wrong.
When I accessed the site, I was redirected to gammatraffic.com
.
Please do not access this site.
Steps to exclude referrers in GA4
- Click the gear icon
Admin
in the bottom left corner of Analytics - Click
Data Streams
in Property section. - Click the appropriate data stream.
- Click
More tagging settings
at the bottom. - Click on
List unwanted referrals
. - Set the
Match type
toReferral domain contains
and enter the domain you want to exclude in theDomain
field. - Click the
Save
button in the upper right corner.
You can also refer to the following image.
To exclude referrers in universal analytics.
In this case, use a filter.
The filter can be done on a Account basis or individually on a View basis.
! Caution.
Filters are not applied to past data. Therefore, the data may fluctuate significantly before and after the filter is applied.
When applying a filter on a large site, it is safer to apply it to a new view.
Also, even if you remove the filter, the data during the period of application will still be the one collected with the filter applied. Please note that the data will not return to the data before the filter was applied.
The procedure is as follows:
- Enter a filter name. Make sure to use a name that is easy to understand. 2.
- Select the filter Type
Custom
. - Select
Exclude
. - Select
Referral
forFilter Field
- Enter the domains you want to exclude in the
Filter Pattern
(you can enter a single domain name or multiple domain names using regular expressions) - If you want to filter by account, select the view you want to apply the filter to in the
Apply Filter to View
section. - Click
Save
.
You can also refer to the following images.
In the example above, I selected Referral
in step 4, but you can select items such as Search Terms
or Language
depending on the spams.
In the case of this spam, the keywords of the organic access contained spam strings, so it is better to select Search Terms
.
You can use regular expressions in filters
The filter pattern in Universal Analytics also supports regular expressions.
So if you want to exclude multiple domains from a referral, you can enter like the following in the filter pattern
example\.com|secondexample\.com|. *spammysubdomain\.com
In the above example, either example.com
, secondexample.com
, or . *spammysubdomain.com
will be excluded.
The last one . *spammysubdomain.com
indicates the domain containing spammysubdomain.com
, which can be used to exclude subdomains.
Also, be careful not to end a sentence with a pipe |
. If it ends in a pipe, it will exclude all referrals.
What is referrer spam?
Referrer Spam is the act of an annoying person called a spammer. They access a site by setting their site as a referrer, etc., trying to make us access their sites.
In Google Analytics, you can check the referrers, etc., and the purpose of the spammer is to get you to access the referrer displayed there.
In some cases, they may want you to visit their site, but in other cases, they may be leading you to a phishing site or a site that contains malicious programs.