Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 146459
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T08:36:25+00:00 2026-05-11T08:36:25+00:00

As the question states, I’m trying to figure out how google tracks clicks on

  • 0

As the question states, I’m trying to figure out how google tracks clicks on search results. When you view the source, you find the following:

 <a href='http://www.yahoo.com/' class=l onmousedown='return rwt(this,'','','res','1','AFQjCNG7Ba-stir4109vlLygPQX7QGf8bg','&amp;sig2=Vx5PLxf04C-yJYZTZfvk8w')'><em>Yahoo</em>!</a> 

The function rwt is, which is pretty messy:

windows.rwt=function(b,d,e,g,h,f,i,j){ var a=encodeURIComponent||escape,c=b.href.split('#'); b.href=['/url?sa=t\x26source\x3dweb',d?'&oi='+a(d):'',e?'&cad='+a(e):'','&ct=',a(g),'&cd=',a(h),'&url=',a(c[0]).replace(/\+/g,'%2B'),'&ei=7_C2SbqXBMW0-AbU4OWnCw',f?'&usg='+f:'',i,c[1]?'#'+c[1]:''].join(''); b.onmousedown=''; return true}; 

So it looks like Google is changing the href of the a tag to /url?... which I’m assuming is where their tracking is. From LiveHeaders in Firefox, it looks like this page is redirecting the browser to the original href of the a tag.

Is this correct and is this the best method of tracking clicks on links on your site, such as ads?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-11T08:36:26+00:00Added an answer on May 11, 2026 at 8:36 am

    It’s actually changing the href of the link rather than the window location. It’s setting b.href, and b refers to the link itself. This runs in onmousedown, so when you release the mouse and the click is handled you magically get sent to that new href.

    Any click tracking pretty much comes down to sending the user to some equivalent of Google’s /url?… script, counting the click, and performing a 302 redirect to the real destination.

    This javascript href replacement has the advantage of automatically filtering out any robots that don’t run scripts. The downside is that it also filters out any real people that have javascript disabled. If, like Google, you just care which link is most popular with your real human users, this works out quite well. The clicks that you do record should be representative of real human traffic, and you can safely ignore the clicks from non-javascript users because they probably have the same preferences anyway.

    Most adverts just link straight to the counting URL with no javascript replacement. This means that you definitely count every real click on the link, but you need to worry about filtering out requests from robots, since they’ll now see your counting URL too.

    Which you prefer really depends on why you want to track the clicks.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 62k
  • Answers 62k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • added an answer You don't need to create numpy arrays to call numpy.std().… May 11, 2026 at 10:09 am
  • added an answer I have a Python script to make moving around a… May 11, 2026 at 10:09 am
  • added an answer select t1.make, t1.model, t1.year, t1.other_cols from table t1 where year… May 11, 2026 at 10:09 am

Related Questions

As the question states, i am a C#/Java programmer who is interested in (re)learning
I would (as the question states) like to make an asynchronous call, preferably using
As the question states - is there a good tool out there which lists
The question is as simple as stated in the title: What's the difference between
Question as stated in the title.
As the question implies, I'm looking for a way to programmatically screen grab a
As the question says, it just escaped my memory how to display xml in
As the question says, how do I set the value of a DropDownList control
As the question says, how do I add a new option to a DropDownList
As the question says, what are some common/major issues that C++ programmers face when

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.