|Links in Google SERPs change on click - a new behavior|
I noticed something new yesterday. At least it's new to me.
Unlike many people, I've been getting the long-form Google URLs almost exclusively for a long time. So if I search on "google" and hover on the headline, in my status bar, it shows a URL like:
I use the "My Library" feature of Google books a lot, so I'm often signed into a Google account. I'm not sure if that matters. I do have "search history" turned off and all that, but I suspect being logged in changes things.
Anyway, lately I've been noticing more URLs that are actually just the destination. So for the "google" search, I hover on the link, and it's just like it used to be: http://www.google.com which matches the link given at the bottom of the result.
The way I noticed is that if you *right* click, it fires the event and the URL gets transformed. So I haven't left the page and when I hover over a link that I have right clicked, I now get the long form in the status bar. In other words, there's some DOM scripting that is actually changing the URL.
A little look at the source code show that it fires on the OnMouseDown event.
So the URL looks like this:
<a href="http://www.google.com/" class=l onmousedown="return rwt(this,'','','res','4',
In the doc head, the rwt function is defined as:
[edited by: tedster at 7:12 pm (utc) on May 22, 2009]
[edit reason] added line breaks to prevent side-scroll [/edit]
I looked at this briefly using the "Live HTTP Headers" add-on, and the most interesting thing is that I see the JS request going to Google, and resulting in a 204-No Content response, and then I see a request direct to my server with the same referrer (the same/original search results page).
No time right now to dig in further, but it appears that the one "click" on the displayed URL results in both HTTP requests "in parallel"... i.e. this is NOT a redirect through Google.
Interesting - I thought of looking with LiveHTTPHeaders but just didn't have the time to look further. But I was wondering what happened on that end.
Interesting in that if one has custom-made analytics software, will the referrer look different? Because I'm pretty sure something's wonky with mine. Though I know it's rife with bugs, something changed with Googs referrers a while back and this might be it.
Some reading up reveals that the HTTP 204 header is intended to be used for such things... It's essentially a request that gets sent almost in the background without the user necessarily knowing it, and the user is left exactly where they are when given a 204.
From my understanding, what's actually happening in the Google code is:
1) User clicks link.
2) Because onclick is executed before href is visited, code is executed, with HTTP request sent to Google for tracking and an HTTP 204 response is given.
So the two request don't happen in parallel. The tracking is done directly before the visit to the site.
Time to reread the HTTP spec to see what else I don't know about :)
[edited by: Chico_Loco at 4:38 am (utc) on May 27, 2009]
Click Tracking at Google (Hidden) [webmasterworld.com]
One way to see the actual link is to click on a result and then go back to the results page - the destination will have changed (as reported [webmasterworld.com] by a member last year).
I believe most of the 204s are unrelated to click tracking (e.g. requests to clients.google.com). I think this is just general analytics or similar.
To me this is Quality Score at an Organic level, and would go some way to explaining why there are such large fluctuations in the organic listings. Looking at the source code on a page of Google results it's a mess, designed to make interrogation as difficult as possible. Don't remember it always looking like this either.
Thanks Andy. I see that you were getting the same onmousedown event back in November and other people were reporting it in 2003.
It's funny, because based on what I've read here, I was getting served the "long form" URLs relatively early and often compared to others, but this is a new behavior for me.
There are a few different thing here, ergophobe.
Google's onclick SERP tracking has been around for a long time. I think there was even a deconstruction of it on the WebmasterWorld few years ago.
Recently, they changed the redirects at /url to be client-side, rather than server-side, for a significant proportion of users - and went as far as announcing this publicly.
I believe that I've seen tests of this for a long period; many who use a variety of web analytics packages will have seen odd Google referrals at one point or another. Some are as a result of analytics software not being able to interpret the different referring URLs.
Personally, I think the change is because of a different requirement for data collection at Google - i.e. someone needed them to change this to record a certain type of data - or tie new data into an existing system.