Why?
Sometimes, Google fails to index links deep inside your site, but your index page still comes up high for certain terms.
The thing is, you probably don't have that item on your front page, and so if the user follows a link like this in Google to your homepage, they'll have to forage around in your site to find the thing they just searched for.
Here is some template code that acts as a proxy, taking the google search, and sending to your internal search. If someone clicks on a link in Google, and lands on your homepage, they will be forwarded to a search for those terms. This is usually something they are looking for. I've found that it works rather well.
Insert this block into your index page, just above the </head>, or in fact, anywhere in the page.
here is a search to try: basketball shoes. Click basketballasylum.co.uk, to see what happens.
this is a freebie kids, and this means i cannot provide direct support for it, any updates will land right here. thx.
changelog:
- added support for ignored terms
- converted the code to a template based blockif
- added array prototype for Iexplorer support.
comments/opinions?
Sometimes, Google fails to index links deep inside your site, but your index page still comes up high for certain terms.
The thing is, you probably don't have that item on your front page, and so if the user follows a link like this in Google to your homepage, they'll have to forage around in your site to find the thing they just searched for.
Here is some template code that acts as a proxy, taking the google search, and sending to your internal search. If someone clicks on a link in Google, and lands on your homepage, they will be forwarded to a search for those terms. This is usually something they are looking for. I've found that it works rather well.
Code:
<actinic:block if="%3cactinic%3avariable%20name%3d%22IsBrochureHomePage%22%20%2f%3e%20%3d%3dtrue" > <script> //stupid ie compatibility if (!Array.prototype.indexOf) { Array.prototype.indexOf = function(elt /*, from*/) { var len = this.length; var from = Number(arguments[1]) || 0; from = (from < 0) ? Math.ceil(from) : Math.floor(from); if (from < 0) from += len; for (; from < len; from++) { if (from in this && this[from] === elt) return from; } return -1; }; } var queryString = new Array(); var thisurl = document.referrer if(thisurl.indexOf("google")!=-1){ var querystring = thisurl.split('?'); var parameters = querystring[ 1 ].split('&'); for (var i=0; i<parameters.length; i++) { var pos = parameters[ i ].indexOf('='); if (pos > 0) { var paramname = parameters[ i ].substring(0,pos); var paramval = parameters[ i ].substring(pos+1); queryString[ paramname ] = unescape(paramval.replace(/\+/g,' ')); } else { queryString[ parameters[ i ] ]="" } } // blocked words, that will not trigger the search: var myBlocked=new Array("term1","term2","term3"); if(myBlocked.indexOf(queryString[ 'q' ])==-1){ document.location='<actinic:variable name="CgiUrl" />ss<actinic:variable name="CGIScriptIDText" />.pl?page=search&SS='+queryString[ 'q' ]+'&search=ACTION&PR=-1&TB=A'; } } </script> </actinic:block>
here is a search to try: basketball shoes. Click basketballasylum.co.uk, to see what happens.
this is a freebie kids, and this means i cannot provide direct support for it, any updates will land right here. thx.
changelog:
- added support for ignored terms
- converted the code to a template based blockif
- added array prototype for Iexplorer support.
comments/opinions?
Comment