Append Tracking Information Without Creating Duplicate Content
I mentioned towards the end of my Search Engine Land article about redirects how you can use the hash or pound symbol (#) in a URL to append tracking information.
Why do this? Because it would prevent duplicate content (ie. the same page at multiple URLs that look unique to the engines), and it would aggregate all link juice to the one canonical URL.
The # in an URL is usually used for sending visitors to an anchor within the page they are on (e.g. "Jump to top of page" or "Jump to Table of Contents").
Appending tracking information to URLs with a # works from an SEO perspective because search engines ignore the # and everything after it. This effectively collapses the tracked URLs together.
Let's take a look at a concrete example to see how this plays out. Imagine you linked to your "About Us" page from your blog and that link pointed to:
www.mythicalcompany.com/aboutus.php#blog
and from your site-wide footer on your ecommerce site you linked to:
www.mythicalcompany.com/aboutus.php#footer
Both URLs would be interpreted by Google and the other engines as:
www.mythicalcompany.com/aboutus.php
Yet the full URL (www.mythicalcompany.com/aboutus.php#footer) is what will show up in your log files. So any stats package that uses log file analysis can pick up and report on the tracked URLs.
However you can not use this technique for passing parameters in your URL for use by your PHP (or ASP or whatever) scripts, because the anchor information (i.e. any text after the #) is not carried over into the environment variables like REQUEST_URI.
1 comment
-
You rock.
Any ideas on possibly pulling the logged "#" URL into a PHP function? (maybe export Log entries with "#" URL requests to a site-internal dbase? can that be done on-the-fly in real time?)
Don't hate a non-programmer, please. I just think you have the right viewpoint to be able to see and/or develop this idea, if it's possible.
No matter, GREAT TIP!
Chat ManComment by SEO Chatter [Visitor] · https://www.google.com/reader/shared/06301086669655534088 — 08/22/08 @ 20:29
