The question is how do you find out who’s been digging you?
1. Using the Google Analytics or some similar tracking code. But we don’t have the patient to sit around the whole day waiting for them to update their data.
2. Write some custom code to extract the referral URL in the GET request. Even though we might be able to get real time data with this method, but it will take time to write and test the code. Since most of us are very lazy so this is also a no go.
3. Run some simple shell commands of which I’m about to show you.
The following instruction will only work if you have shell access to your webhost and you know the location of the access.log file, where Apache logs all the activities. On Dreamhost, the path is /home/username/logs/domain_name/http/access.log.
- To quickly show all the visitors who digged your story.
$cat access.log | grep digg.com
To count the total number of visitors coming from digg.
$cat access.log | grep digg.com | wc -l
Here is the magic, monitor digg users in real time as they come.
$tail -f access.log | grep digg.com
To see who google’d you, simply replace digg.com with google.com.