Skip to main content

Utility (external) navigation

Google Chatback Badge Improvements

Google Chatback badges are great for adding the ability to chat to with your visitors to your sites — Google even offers a couple of formats that you can copy and paste straight from their site. It couldn’t be easier! However, if you’d like the coolness of the iframe version (javascript popup, etc.) and the themability of the simple link, here’s a little code for you:

  <a class="ask-item" title="Chat with Brad instantly"
    <script type="text/javascript">
      if (location.protocol.toLowerCase() == 'http:') {
        document.write(unescape("%3Cimg src='' alt='' /%3E"));
    <span>Chat with Brad</span>


  • For those of you that use protocols other than http, the script will conditionally avoid a mismatch. If this isn’t a concern, you can remove the javascript and just use the straight img tag
  • The whole thing is wrapped in the link to make the indicator clickable, so the span can be used to style the text with an underline
  • To use it, just get the URLs from the Google code generator and insert them where they make sense
  • The link uses inline JavaScript, which is not the best answer in terms of usability and browser compatibility, but should fail silently in fringe use cases