Archive for the ‘google’ Category

Duplicate content test and URL canonicalization

Sunday, February 15th, 2009

Days ago I uploaded the following script on my server:


  if ($_SERVER["QUERY_STRING"]=='foo&bar') {
    echo "index test one";

  if ($_SERVER["QUERY_STRING"]=='bar&foo') {
    echo "bar and foo";

  if ($_SERVER["QUERY_STRING"]=='bar&foo&test') {
    echo "bar and foo";


I then published 3 links to my site’s index so Google could follow them:

Days later I got this result for the Google query

The first and third result are the same (duplicate content). Google has indexed them both though. This is a common SEO problem in dynamic web sites where there can be many different URLs linking to the same page (paginators, out of date URLs, archive pages etc) or where you want to do URL Referrer Tracking.

Google has recently published a way of overcoming this problem. You can now specify which is the real (or primary) URL for the page. E.g:

<link rel="canonical" href="/foo.php?foo&bar" />

So, as SEOmoz said, this definitely is The Most Important Advancement in SEO Practices Since Sitemaps.

Best way to integrate Google Analytics

Thursday, November 6th, 2008

This is the best solution to integrate Google Analytics into your site. It uses ideas and code from the following 2 sites:

Here is the improved snippet:

<script type="text/javascript" src=""></script>
<script type="text/javascript">
    if (typeof(_gat)=='object')
            _gat._getTracker("UA-1234567-8")._trackPageview()}, 1500);


  1. Does not use document.write
  2. Fixes the “_gat is not defined” issue
  3. Delayed GA access (1.5 second) so the page load time is not affected
  4. Very concise

Another improvement would be to cache ga.js locally to avoid the DNS lookup.

Learn to use Google

Tuesday, April 3rd, 2007

What is Google

Google is the best search engine around. It is very user friendly, easy to use and has tons of features. By using Google you can have all the knowledge in the world, available to you; in a snap.

The Problem

Although the facts above sound very nice, and everybody seems to be using Google, it is still (on 2007) considered natural for non technical people (my mom, your mom etc) to be hands tied and feel “blind” when using the Internet. It is not expected from them to be able to find the information they want, easily and accurately, although this is not hard at all.

When talking for technical people though (developers, designers, analysts, managers etc) it is completely unacceptable when one (or more) of the following behaviors are observed:

  1. Complete ignorance of the search engine (rare).
  2. Boredom to such degree where searching is not an option (common).
  3. Inability to find correct search keywords for the topic in question (common).
  4. Incompetence to use Firefox properly (Tabs, Search Bar, maximal use of keyboard) in a degree that makes searching slower than it should be, thus turning away the individual from searching as often as possible (common).
  5. “Can’t be bothered-I’ll ask my co-worker” syndrome (very common).
  6. “I give up, this is not possible – has not been done before” syndrome (rare).

The Facts

These behaviors are definite showstoppers. They make you a less productive and irritated person. No need to analyze that further.

The Solutions

  • Do you observe such behaviors on your employees? Time for a chat with them. Have someone show them how “the Google” works.
  • Do you observe such behaviors on you; on your daily work routine? You can do better – and please start today!

And why do you care?

I’ve been watching people, engaging into long discussions with other people about that tool… that css compressor tool that has been mentioned once in a meeting… which meeting? Yes, that meeting, oh yes… and what does it do? It strips whitespace and makes the css file less readable and blah blah blah…
– google: css compressor
1st result

I’ve been watching people, trying to explain what they want to achieve, and whether it is possible. They want an ajax thingy which will update part of the screen without refreshing the whole screen (irony?), which will be displaying chat messages from many people, possibly by polling the server every so ofter… blah blah blah
– google: ajax chat example poll server
1st result

I’ve seen people lifting themselves (literally) from their seat, walking down the aisle, to ask a colleague to give them (yes give them) the URL where from they can download NetBeans!
– google: download netbeans
1st result


Man… it’s not that hard. Make your lives easier, and let the people around you work! If you don’t know how to use Google, then google for a google tutorial :)

Happy googling…