This is primarily for the stats nerds using WordPress, though the general principles can be applied all over the internet, wherever query strings are used. The issue in this case is the default display of only the top 10 referrers from any webserver. I was shown, by a helpful WordPress developer, a trick to see all of the referrers under an aggregation rather than just the top ten, by adding a parameter to the query string on your stats page.
A quick primer on query strings: A query string is a way to provide data to the web server in order to make the web page that is requested in the URL (the address line in your browser) behave in a particular manner or display specific data.
A couple of examples:
LinkedIn provides special URLs that give users access to external web pages that other users have shared.
In this URL, you can see some numbers after the question mark that represent the articleID, the gid (group ID), and the item (posting ID), while the articleURL is followed by the encoded URL.
This is a fun site that keeps you informed of when your favorite shows are about to air new episodes.
Each of the items following the question mark represents a selected show. Add a show to your selections, and you add another parameter to the URL.
I have highlighted the parameters I am referring to so you can see them in these URLs.
So on to the issue…
WordPress recently added a new feature to the stats page that aggregates all of the pages that referred visitors to your blog by the domain. Let me show you what it looks like:
As you can see when you click the image to enlarge, 29 people clicked a link somewhere on a page on the LinkedIn website that directed them to someplace on my blog. You can get more detail – the URLs of the pages included in those 29 clicks – by clicking on the plus sign, as shown in the image below.
On the main stats page for your WordPress blog, http://YOURBLOGNAME.wordpress.com/wp-admin/index.php?page=stats, when you expand by clicking the plus sign, the page only shows the top ten pages that referred to your blog.
Now, for many people, this would be adequate. For my promotion strategy, though, it is not.
For my SharePoint-related posts, I post links to my blog entries in the LinkedIn SharePoint groups that I am a member of. I want to know what groups are sending me traffic (and which ones aren’t – I may decide these are not worth my time and effort and drop them). As you saw above, the LinkedIn referer URL includes the gid (Group ID) of the group that the referral came from. I have a handy-dandy spreadsheet that I use to track how many clicks come from which ID, and the group ID-to-name translation. (Did I mention that this post was for stats nerds?)
So I wanted all of the referring links, not just the top ten. If you go to the stats page that shows the list of referrers for a number of days, broken out by day, like this page: http://YOURBLOGNAME.wordpress.com/wp-admin/index.php?page=stats&blog=#######&view=referrers&numdays=7, you get the same problem – the number of referrers is limited to ten when you expand the aggregation. (You would need to replace the ####### with your blog’s ID number.)
However, when you click one of the links on the page as shown in the first image (7 Days, 30 Days, Quarter, Year, All Time), you go to a URL like http://YOURBLOGNAME.wordpress.com/wp-admin/index.php?page=stats&blog=#######&view=referrers&numdays=7&summarize, which is a page that shows all of the referrers when you expand the plus. But it is all of the referrers for the date range, not one day, in a single list.
I sent in a feature request to get all of the referrers in the list for just a single day. I was told that the individual day page displays would not be changed, but that there was a way to change the URL to get the date range page to show a single date with all of the referrers. Take a look at each of the two URLs above. One of the differences is the parameter “summarize” (preceded by the ampersand if it follows another parameter). If you remove the “&summarize” from the second URL, you get a page that displays the same date range, but as individual days. Unfortunately, without “summarize” the number of referrers shown when expanded is limited to 10. But if you instead add “&date=” as well as the date in the format “2011-01-13” (YYYY-MM-DD), and set the number of days equal to 1 (“numdays=1”), you will get the view of a single day WITH all of the referers!
Have fun hacking the URLs and see what hidden features you can find!