[ic] Removing session ID from the URL

Mike Heins mike at perusion.com
Tue Jan 11 19:49:00 EST 2005

Quoting Kip Lawrence (kip at jkcrafts.com):
> >
> >You might need to be more explicit about on what server what happens
> >for those of us that do not use AdSense.
> >
> >If it's a case where you need to make sure GoogleBot doesn't find
> >session id's, then we've already talked about that (use RobotUA,
> >RobotHost, etc.).
> >
> >If it's a case where you are displaying Google ads on your site,
> >and there is some mechanism (JavaScript) where your site sends the
> >current URL to Google in order for Google to send you relevant ads
> >for placement on your pages (I'm just guessing about AdSense operation,
> >here), then perhaps you could filter what is sent to Google to strip
> >out session id and page count variables.
> I've used Google AdSense before... I can explain what is happening...
> To put AdSense Ads on one of your pages you copy some javascript that
> Google gives you on to your page. This will send the url that is in
> the address bar of your browser to Google to determine what ads to
> show. Google will then match the URL (from your browser address bar)
> with what it's spider had previously found. The URL passed to Google
> has a sessionid in it. The URL that the spider found previously does
> not. Because they do not match Google will not show real ads.
> I've not done it but my solution would be to modify the javascript you
> put on your page to filter out sessionids before you pass it to
> Google... this should fix the problem in my opinion.

Aha. Thanks for the elucidation -- it should be an easy fix
to do that:

	url = url.replace(/\?.*/, '');

assuming that you don't have any CGI params in your AdSense URLs.

Mike Heins
Perusion -- Expert Interchange Consulting    http://www.perusion.com/
phone +1.765.647.1295  tollfree 800-949-1889 <mike at perusion.com>

p.s. sorry for lower case, injured hand

Nature, to be commanded, must be obeyed. -- Francis Bacon

More information about the interchange-users mailing list