Hi buddies

This is the scenario: You have a good positioned site yourdomain.com where many people arrive but it is focused in many things, ( not only the zc shop ).


AND you have yourdomain/shop where people can buy your products.


lets say you have a word press site about cars where you post news and reviews about cars, and bikes, etc

AND you have a domain/shop where you sell car mirrors, car decals, car tires, whatever.

Then many of your google users could be redirected straigth to your /shop/

if the user googled new "corvette review", you should let the user go to your main site

but if the user googled "corvette mirrors" then you should redirect them to your /shop/

How to do that?

in a flash banner placed in your main site, detect the referrer (the complete url of the site where the visitor came from)



that is possible with this sentence
Code:
getURL('javascript:window.document.myFlash.SetVariable("myVar", document.referrer)');
a few frames later, (let flash receive the result values) place this

Code:
_global.refer=myVar;
then is easy in flash to detect in that string if your the user googled any of your products ( "mirror" i.e. )


Code:
keys=["mirror"];
keys.push("decal");
keys.push("tires");/// list of all of your keywords/products

shoulIredir=0;// variable that determine if ¿should I redirect?

_global.enlowercase=_global.refer.toLowerCase();// converts the google search into lowercase 

for(i=0;i<keys.length;i++){
	whereisthekey=_global.enlowercase.indexOf(keys[i]);
	if(whereisthekey!=-1){//if any of the keywords is detected in the url of the referer , then sets "¿should I redirect ?" variable to whatever +1
		shoulIredir++;
	}
}


if(shoulIredir>0){// if "¿should I redirect ?" variable is greater than cero (at least ONE keyword was found in url referrer), then redirect
	getURL("http://www.yourdomain.com/shop");
}

BUT ATTENTION

make sure you include between <object> tags , this :



Code:
name="myFlash" swLiveConnect="true"



Very well explained in

http://www.adobe.com/es/support/flas...cript_comm.htm



I use it in http://www.zebravinilos.com if you find it by googlyng "vinilos decorativos" you click and you would be redirected.

If you came from any other site or direct trafic, you visit my main site.

Hope you find it usefull and excuse my horror english


regards,