Webmasters Stack Exchange is a question and answer site for pro webmasters. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

My Google Analytics reports a bounce rate very high for outbound/javascript:void(0) but I don't understand what this URL is. I use Drupal, and in the HTML code there isn't this URL.

share|improve this question

migrated from stackoverflow.com Nov 10 '11 at 11:05

This question came from our site for professional and enthusiast programmers.

Can you share the URL of your site with us? – Toby Nov 29 '11 at 0:33

javascript:void(0) is not a URL - it is a way to prevent links from direct loading any URL. Actually this attribute means 'Do Nothing'.

In most cases this is needed when the link calls a JavaScript function on the current page.

In links the href attribute is required : <a href="http://www.example.com">link</a>, but in some cases is needed link to call JavaScript function - this can be achieved with next attribute: href="javascript:SomeFunction();"

The problem is that href attribute cannot forward reference to itself to the called JavaScript function. If for example you need to change clicked link color to red and to change the link innerHTML the easiest way is to use this word as reference to the link itself: <a href="javascript:void(0)" onclick="this.style.color='red';this.innerHTML='This link';">link</a>

So current javascript:void(0) mean that your link is connected to a JavaScript call - this call can do everything - load another page, or site or any JavaScript function. You must look at your JavaScripts to find the reasons why those links affect your site bounce rate.

In Google Analytics you can try to check 'Content' > 'Events' where usually function calls are recorded, just be aware the Google Analytics Events tracking must be activated again via JavaScript on the site.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.