homepage Welcome to WebmasterWorld Guest from 54.163.72.86
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Visit PubCon.com
Home / Forums Index / Google / Google SEO News and Discussion
Forum Library, Charter, Moderators: Robert Charlton & aakk9999 & brotherhood of lan & goodroi

Google SEO News and Discussion Forum

    
Links in Google SERPs change on click - a new behavior
ergophobe




msg:3918682
 6:27 pm on May 22, 2009 (gmt 0)

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:
http://www.google.com/url?sa=t&source=web&ct=res&cd=4&url=http%3A%2F%2Fwww.google.com
%2F&ei=OewWSsXFFKTgtAOJjdiSDw&usg=AFQjCNG5-9Jej-ukVeakTgwonqt2narbYg&sig2=4Lwo00y104At7P9SCT7uXA

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.

Now here's where it gets interesting: if you CLICK on the link, it is transformed into the long form. Normally if you just click, you wouldn't see this and wouldn't know that Google is using Javascript to rewrite the URL *client* side *before* submitting the GET request.

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',
'AFQjCNG5-9Jej-ukVeakTgwonqt2narbYg','&amp;sig2=4Lwo00y104At7P9SCT7uXA')">

In the doc head, the rwt function is defined as:


window.rwt=function(a,d,e,g,h,f,i,j){
try {
if(a===window) {
a=window.event.srcElement;
while(a){
if(a.href)break;
a=a.parentNode
}
}
var b=encodeURIComponent¦¦escape,c=a.href.split("#"),k=["/url?sa=t\x26source\x3dweb",d?"&oi="+b
(d):"",e?"&cad="+b(e):"","&ct=",b(g¦¦"res"),"&cd=",b(h),"&url=",b(c[0]).replace(/\+/
g,"%2B"),"&ei=","3cgWSoiDAZmWswOEhvTZCA",f?"&usg="+f:"",i,c?"#"+c[1]:""].join("");

a.href=k;
a.onmousedown=""
}
catch(l){}
return true
};

[edited by: tedster at 7:12 pm (utc) on May 22, 2009]
[edit reason] added line breaks to prevent side-scroll [/edit]

 

jdMorgan




msg:3918749
 7:59 pm on May 22, 2009 (gmt 0)

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.

Jim

ergophobe




msg:3918753
 8:00 pm on May 22, 2009 (gmt 0)

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.

Seb7




msg:3920512
 6:58 pm on May 26, 2009 (gmt 0)

I've noticed that Google have monitored SERP clicks using JavaScript for some years now but never looked deep enought to see where it was sending the data. The JavaScript always did treat left and right clicks the same. Sending clicks to a page that doesnt appear to respond is quite a good idea.

Jexley




msg:3920654
 1:13 am on May 27, 2009 (gmt 0)

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.

Chico_Loco




msg:3920727
 4:33 am on May 27, 2009 (gmt 0)

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.
3) Because of the 204 response (and because the javascript doesn't return false), the browser does not redirect anywhere and continues to execute the click event, the next step of which is visiting the href i.e the listing.

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]

Receptional Andy




msg:3920778
 8:45 am on May 27, 2009 (gmt 0)

This isn't new behaviour, although I don't remember specifically when it was introduced. It's certainly been several years, although the javascript has changed during that time. Here's a report from 2003:

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.

2clean




msg:3920860
 12:33 pm on May 27, 2009 (gmt 0)

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.

ergophobe




msg:3920998
 4:20 pm on May 27, 2009 (gmt 0)

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.

Receptional Andy




msg:3922060
 10:47 pm on May 28, 2009 (gmt 0)

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.

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Google / Google SEO News and Discussion
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved