如何在Google Analytics(分析)中封锁WordPress推荐连结来源垃圾邮件

Are you getting a lot of referrer spam in your Google analytics? Referrer spam is a way to pass fake referer information to websites. These spammy links then appear in a users analytics and can lead you to click on malicious websites. In this article, we will show you how to effectively block WordPress referrer spam in Google Analytics.

您的Google Analytics(分析)是否收到大量引荐来源垃圾邮件? 引荐来源垃圾邮件是一种将伪造的引荐来源信息传递到网站的方法。 这些垃圾邮件链接随后会出现在用户分析中,并可能导致您单击恶意网站。 在本文中,我们将向您展示如何有效地阻止Google Analytics(分析)中的WordPress引用来源垃圾邮件。

Google Analytics(分析)入门 (Getting Started With Google Analytics)

If you are not using Google Analytics on your WordPress site, then you should check out our guide on how to install Google Analytics in WordPress.

如果您未在WordPress网站上使用Google Analytics(分析),则应查阅有关如何在WordPress中安装Google Analytics(分析)的指南。

Google Analytics is an awesome free tool that allows you to see how users interact with your website. You can see which pages users are visiting, track clicks on links, run split tests, and much more. See this beginner’s guide on how to use Google Analytics for your WordPress site.

Google Analytics(分析)是一款很棒的免费工具,可让您查看用户如何与您的网站进行互动。 您可以查看用户正在访问哪些页面, 跟踪链接的点击次数运行拆分测试等。 有关如何在WordPress网站使用Google Analytics(分析)的信息,请参阅此初学者指南。

For those of you who are already using Google Analytics, let’s fix the referrer spam problem in your Google Analytics reports.

对于已经在使用Google Analytics(分析)的人,让我们在Google Analytics(分析)报告中解决引荐来源垃圾邮件问题。

什么是引荐来源垃圾邮件? (What is Referrer Spam?)

We all want our websites to be noticed. It makes us happy when other websites link to our articles. Referral spammers take advantage of this desire by sending fake referer URL with automated scripts to thousands of websites.

我们都希望我们的网站受到关注。 当其他网站链接到我们的文章时,这使我们感到高兴。 引荐垃圾邮件发送者通过将带有自动脚本的伪造的引荐来源URL发送到数千个网站来利用这种需求。

This URL then appears in your Google analytics or any other stats service you are using as referrers. Considering the fact that they affect millions of websites, it is likely that many users may want to explore these sites when they see them in their referral reports.

然后,该URL就会显示在您的Google Analytics(分析)或您用作引荐来源的任何其他统计服务中。 考虑到它们影响数百万个网站的事实,很可能许多用户可能会在引荐报告中看到它们时浏览这些网站。

Referral Spam
为什么您需要担心引荐垃圾邮件 (Why You Need to Worry About Referer Spam)

Some might say that referrer spam is quite harmless unless you click on the links. Well let’s assume that you won’t click on those links, there are still other downsides.

某些人可能会说,引荐来源垃圾邮件是非常无害的,除非您单击链接。 好吧,假设您不会单击这些链接,但还有其他缺点。

If you are small or medium sized website, then referer spam can ruin your sites analytics reports.

如果您是中小型网站,则引荐垃圾邮件可能会破坏您的网站分析报告。

If you decide to sell your website and share this report with interested buyers, these spam links can leave a bad impression on them.

如果您决定出售您的网站并与感兴趣的买家共享此报告,则这些垃圾邮件链接可能会给他们留下不好的印象。

我们如何处理引荐来源垃圾邮件? (How We Deal With Referrer Spam?)

We use Sucuri to monitor our website’s security. Sucuri not only only protects our website against malware and trojans, it also blocks referrer spam.

我们使用Sucuri来监视我们网站的安全性。 Sucuri不仅可以保护我们的网站免受恶意软件和木马的侵扰,还可以阻止引荐来源垃圾邮件。

Sucuri Website Firewall blocks most known bad referrals by default. Their team is always adding new referral spammers to the list and actively monitoring their behavior.

默认情况下, Sucuri网站防火墙会阻止大多数已知的错误引用。 他们的团队始终在列表中添加新的推荐垃圾邮件发送者,并积极监视其行为。

使用插件阻止WordPress中的引荐来源垃圾邮件 (Blocking Referrer Spam in WordPress Using Plugin)

There are several WordPress plugins that can help you keep referrer spam to a bare minimum. These plugins use web services that are actively monitoring referral spam websites and use that list to block referral spam.

有几个WordPress插件可以帮助您将引荐来源垃圾邮件保持在最低水平。 这些插件使用Web服务来主动监视引荐垃圾邮件网站,并使用该列表阻止引荐垃圾邮件。

First thing you need to do is install and activate the SpamReferrerBlock plugin. Upon activation, you need to visit Settings » Spam Referrer Block to configure the plugin.

您需要做的第一件事是安装并激活SpamReferrerBlock插件。 激活后,您需要访问设置»垃圾邮件引荐来源块来配置插件。

Custom Blacklist

On the plugin’s settings page, you will see a text area to create your own custom blocking lists. Below that you will see the list of sites this plugin is actively monitoring and blocking. You can update this list with the most up to date version by clicking on the download from server button.

在插件的设置页面上,您将看到一个文本区域,用于创建您自己的自定义阻止列表。 在下面,您将看到此插件正在积极监视和阻止的站点列表。 您可以通过单击“从服务器下载”按钮来使用最新版本更新此列表。

Download blacklist or upload yours

If you see a referrer spam link in your Analytics account that is not listed on this page, then you can add it to the custom blacklist. Click on the save button and plugin will start blocking it.

如果您在此页面上未列出的Analytics(分析)帐户中看到引荐来源垃圾邮件链接,则可以将其添加到自定义黑名单中。 单击保存按钮,插件将开始阻止它。

You can also share your custom blacklist with the rest of the internet community by clicking on the upload to server button at the bottom of the page.

您还可以通过单击页面底部的“上传到服务器”按钮,与Internet社区的其他成员共享自定义黑名单。

使用Google Analytics(分析)过滤阻止Ghost引用 (Block Ghost Referrals Using Google Analytics Filtering)

Despite implementing these solutions, you will still see some referrer spam in your Analytics reports. These websites are not visiting your site at all, so Sucuri or any other tool cannot block them.

尽管实施了这些解决方案,您仍将在Google Analytics(分析)报告中看到一些引荐来源垃圾邮件。 这些网站根本不会访问您的网站,因此Sucuri或任何其他工具都无法阻止它们。

They are sending their requests directly to Google Analytics using your UA Tracking code. This tracking code is used by Google Analytics to identify your website. Most site owners add it to their WordPress site’s footer or header section. Anyone can look at this code and use the UA tracking id to generate referrer spam.

他们正在使用您的UA跟踪代码将其请求直接发送到Google Analytics(分析)。 Google Analytics(分析)使用此跟踪代码来识别您的网站。 大多数网站所有者将其添加到WordPress网站的页脚或页眉部分。 任何人都可以查看此代码,并使用UA跟踪ID生成引荐来源垃圾邮件。

Here is how you can block such websites in Google Analytics itself. Login to the Google Analytics account and then go to Audience » Technology » Network.

您可以通过以下方法在Google Analytics(分析)本身中阻止此类网站。 登录到Google Analytics(分析)帐户,然后转到“ 受众”»“技术”»“网络”

You will need to select Hostname as primary dimension and expand the results to Monthly.

您将需要选择主机名作为主要维度,并将结果扩展到每月。

finding hostnames for spam referrals in Google Analytics

You will see a list of hostnames with many spam hostnames in the list. You need to only note down the valid hostnames for your website. For example, www.wpbeginner.com, wpbeginner.com, videos.wpbeginner.com, are all valid hostnames for our website.

您将看到一个包含许多垃圾邮件主机名的主机名列表。 您只需要记下网站的有效主机名。 例如,www.wpbeginner.com,wpbeginner.com,videos.wpbeginner.com都是我们网站的有效主机名。

Now that you have your valid hostnames sending, the next step is to create a filter that only includes the valid host names.

现在您已经发送了有效的主机名,下一步是创建一个仅包含有效主机名的过滤器。

Click on the Admin view and then click on Filter.

单击管理员视图,然后单击过滤器。

Filter menu in Google Analytics admin

This will bring you to the filter screen, where you will click on the New Filter button to get started. You need to select ‘Custom’ as your filter type and then click on Include.

这将带您进入过滤器屏幕,在该屏幕上,您将单击“新建过滤器”按钮开始使用。 您需要选择“自定义”作为过滤器类型,然后单击“包含”。

Creating a hostname filter in Google Analytics

You will enter valid hostnames as filter pattern using Regex string. The format is simple, you will add a ^ sign before each hostname and a $ sign after it. Use | sign to separate hostnames.

您将使用Regex字符串输入有效的主机名作为过滤器模式。 格式很简单,您将在每个主机名之前添加一个^符号,并在其后添加一个$符号。 使用| 签名以分隔主机名。

^wpbeginner.com$|^videos.wpbeginner.com$|^example.wpbeginner.com$

^wpbeginner.com$|^videos.wpbeginner.com$|^example.wpbeginner.com$

Finally, click on the save button to apply the filter. Give it at least 24 hours before you can notice any changes in Google analytics reporting.

最后,单击保存按钮以应用过滤器。 请至少在24小时前给它,以便您可以注意到Google Analytics(分析)报告中的任何更改。

使用Google Analytics(分析)过滤器阻止常见垃圾邮件发送者 (Blocking Common Spammers Using Google Analytics Filter)

You can also block common referral spammers using Google Analytics filters as well. Create a new filter and select Exclude as the filter type. In the filter pattern add the hostnames of the common referral spammers. Here are some of the most notorious referral spam sites in one filter:

您也可以使用Google Analytics(分析)过滤器阻止常见的引荐垃圾邮件发送者。 创建一个新的过滤器,然后选择“排除”作为过滤器类型。 在过滤器模式中,添加常见引荐垃圾邮件发送者的主机名。 以下是在一个过滤器中最臭名昭著的引荐垃圾邮件网站:

semalt\.com|buttons-for-website\.com|blackhatworth\.com|anticrawler\.org

semalt\.com|buttons-for-website\.com|blackhatworth\.com|anticrawler\.org

Don’t forget to click on the save button to apply the filter.

不要忘记单击保存按钮以应用过滤器。

We hope this article helped you learn how to block WordPress referrer spam in Google Analytics. You may also want to see our list of 7 best analytics solutions for WordPress users.

我们希望本文能帮助您学习如何在Google Analytics(分析)中阻止WordPress引荐来源网址垃圾邮件。 您可能还想查看针对WordPress用户7种最佳分析解决方案列表。

If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.

如果您喜欢这篇文章,请订阅我们的YouTube频道 WordPress视频教程。 您也可以在TwitterFacebook上找到我们。

翻译自: https://www.wpbeginner.com/wp-tutorials/how-to-block-wordpress-referrer-spam-in-google-analytics/

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值