Richard Castera

Application Developer/Designer
  • Home
  • About
  • Projects

Posts Tagged ‘Google’

Google, Javascript, Marketing, Web Resources | No Comments | May 21, 2010

Google Analytics – How to manually Track Clicks on Outbound Links

You can use Google Analytics to track clicks on links that lead away from your site. Because links that lead away from your site are not automatically tracked, you will need to manually tag all outbound links you want to track. To do this, you’ll add some JavaScript customizations to your page and to the links you want to track.

  1. Set up Event Tracking in your Analytics Tracking code. This is a simple matter of adding the following line to the tracking code for your pages after the page tracking object is set up:
    var pageTracker = _gat._getTracker('UA-XXXXX-X');
    pageTracker._trackPageview();
    
  2. Add a JavaScript method in the head of your document to delay the outbound click by a fraction of a second. This delay will hardly be noticeable by the user, but it will provide the browser more time load the tracking code. Without this method, it’s possible that a user can click on the outbound link before the tracking code loads, in which case the event will not be recorded. Here’s what the JavaScript code in the section should look like (assuming you will use your own tracking code ID):
    <script type="text/javascript">
    function recordOutboundLink(link, category, action) {
      try {
        var pageTracker=_gat._getTracker("UA-XXXXX-X");
        pageTracker._trackEvent(category, action);
        setTimeout('document.location = "' + link.href + '"', 100)
      }catch(err){}
    }
    </script>
    
  3. Update your outbound links to call the new function without first following the link. For example, to log every click on a particular link to www.example.com, you would use the _trackEvent() method in the link’s tag:
    <a href="http://www.example.com" onClick="recordOutboundLink(this, 'Outbound Links', 'example.com');return false;">Trackable Link</a>
    

The example above uses the category label Outbound Links. This is a useful way to categorize all outbound links in the Event Tracking reports. It sets the specific name of the website as the second parameter in the call. With this structure in place, you could then see Outbound Links as one of the event categories and drill down to see which particular outbound links are the most popular. Be sure to use return false for the onClick handler, because without that statement the browser will follow the link before the recordOutboundLink method has a chance to execute.

For more information on using event tracking, see the Event Tracking Guide on Google Code.

Article Reference URL:
http://www.google.com/support/googleanalytics/bin/answer.py?answer=55527&cbid=-wlhzojb6oodb&src=cb&lev=index

Web Resources | 1 Comment | May 29, 2009

Google Wave – A New Communication Platform.

google_wave

Google Wave is a new model for communication and collaboration on the web, coming later this year. In Google Wave, users create and invite other people to “waves”. Everyone on a wave can use richly formatted text, photos, gadgets, and even feeds from other sources on the web. They can insert a reply or edit the wave directly. It’s concurrent rich-text editing, where you see what other users on the wave are typing in real-time. That means Google Wave is just as well suited for quick messages as for persistent content – it allows for both collaboration and communication. You can also use “playback” to rewind the wave to see how it evolved.

SEO, Web Resources | 1 Comment | May 12, 2009

How does Google compile the list of links below some search results?

The links shown below some sites in Google’s search results, called sitelinks, are meant to help users navigate your site. Their systems analyze the link structure of your site to find shortcuts that will save users time and allow them to quickly find the information they’re looking for.

They only show sitelinks for results when they think they’ll be useful to the user. If the structure of your site doesn’t allow thier algorithms to find good sitelinks, or they don’t think that the sitelinks for your site are relevant for the user’s query, they won’t show them.

At the moment, sitelinks are completely automated. They’re always working to improve their sitelinks algorithms, and may incorporate webmaster input in the future.

Referenced from: Google.

SEO, Web Resources | No Comments | July 13, 2008

Alt Image Attribute Usage – Hear It From Google

Dont’ forget your alt tags! Not only does it provide valid XHTML coding standards but, it adds another layer of keywords that can be added to your page to help improve SEO. Images used in websites that have keywords in the alt tags provide Google with information regarding to what the image is if, they are used right.

Matt Cutts, the head of Google’s web spam team describes which ones are important in this video:

  • Premium Email Templates

    Social Profiles

  • Twitter
  • Facebook
  • LinkedIn
  • Digg
  • Google
  • GitHub

    Last Tweet

  • Beware the heat-seeking Nerf machine-gun coming to a cubicle near you http://om.ly/svHF #fb
  • Follow me
  • Archives

    • August 2010
    • July 2010
    • June 2010
    • May 2010
    • April 2010
    • March 2010
    • February 2010
    • October 2009
    • September 2009
    • August 2009
    • July 2009
    • June 2009
    • May 2009
    • September 2008
    • August 2008
    • July 2008
    • June 2008
  • Categories

    • AJAX
    • Apache
    • Books
    • Drupal
    • Ecommerce
    • Flash
    • Google
    • Javascript
    • jQuery
    • Magento
    • Marketing
    • Mootools
    • My Thoughts
    • MySQL
    • News
    • Photoshop
    • PHP
    • Prototype
    • SEO
    • Web Resources
    • Wordpress
  • My Favorites

    • 37 Signals
    • Andrew Warner
    • Chris Coyier
    • Chris Shiflett
    • Collis Ta'eed
    • Development Seed
    • Drupal
    • HubSpot
    • James Padolsey
    • Joel On Software
    • John Resig
    • jQuery
    • Kevin Rose
    • Life Hacker
    • Magento
    • Mashable
    • Matt Cutts
    • Matt Ryan
    • MySQL
    • NetTuts
    • Noupe
    • Photoshop Tutorials
    • PHP
    • Smashing Magazine
    • Tech Crunch
    • WoorkUp
    • Wordpress

2010 © Copyright. Richard Castera - All Rights Reserved.

Top