问题原文
原帖链接 · HOY · CC BY-SA 3.0
Everyday :(, the following user creates one hit on my google analytics which has 3-5 sessions and %100 bounce rate.
ISP: Digital Ocean
Operating System: Linux
City: san francisco
I want to block this, but can't find the IP.
SOLUTIONS I TRIED:
1-
I installed a plugin (WP Statistics) to track user IPs, but it can't catch this user (or bot or whatever)
2- I recorded every IP address that hit my homepage, using following php code piece, but I can't catch the user.
$_SERVER['REMOTE_ADDR']
I will be happy to hear your suggestions.
已采纳解答
原帖链接 · Raul Reyes · CC BY-SA 3.0
This problem is related to spam actions against your GA account. Neither the WP plugin nor the php code would be able to record ghost visitor's (aka Ghost referral) IP address because they are hitting your GA account making HTTP requests by sending raw user interaction data directly to Google Analytics servers. In other words, they do not actually "visit" your website.
The best you can do is filtering these bots via GA Filters. Follow this post recommendations or this other one. I particularly like filtering by "hostname".
Hope that helps.
摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。
