My career in technology

“Hacking” the URL

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.

TV Countdown
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:

List of referrers. Note that there is a plus sign next to the LinkedIn URL.

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.

Aggregation expanded to show detailed list by clicking the plus sign. Note, however, the number of clicks does not add up to 29...

On the main stats page for your WordPress blog,, 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:, 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, 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.

Full list of referrers for a period of time. Note that the number of referrers was too long to screen capture the entire list, but all of the referrers are there on the page.

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! gets you this:

Correct display!

Have fun hacking the URLs and see what hidden features you can find!

I'm an overachiever this week.

For this week, anyway. We'll see what happens going forward.


Comments on: "“Hacking” the URL" (5)

  1. […] Following my work on Hacking the URL, I wanted to simplify the process of posting my blog entries to LinkedIn. […]

  2. Ok, lesson learned.

    A blog entry with the word “hacking” in the title is spambait.

    In the last 24 hours the number of spam comments directed at my blog increased dramatically. 10% of the spam I have gotten since I started this blog I got in the last 24 hours. And all of them are directed at this post.

    And I am guessing that the word “spam” also is a target of spam comments… I mention my “spam guy” story on my About page, and my About page has been (until the last 24 hours) the biggest target of spam comments of any of my posts. I didn’t understand until the last 24 hours. I figure that if the word “hacking” is a target, the word “spam” may be what is causing my About page to be targeted.

  3. […] “Hacking” the URL […]

  4. […] “Hacking” the URL (customizing your WordPress blogging stats reports) […]

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: