Forum Moderators: DixonJones

Message Too Old, No Replies

tracking - javascript question

         

Algebrator

6:55 pm on Dec 5, 2002 (gmt 0)

10+ Year Member



I appologize if this is a silly question, but here it goes:

Is it possible to have a javascript code that goes something
like this (this is a pseudocode, just to give you an idea):

if (referer == "www.google.com" && kwd = "blue widget")
document.write("...something...");

Basically what I would like to do is to dynamically assign
the order number in my html shopping cart code (that would
be the ....something... part) based on where my users come
from.
If so, could you please give me a better idea on how exactly
to do it?
Thanks a bunch

Dreamquick

12:38 pm on Dec 9, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



<added>
/me bows to the superior technical knowledge of key_master and edits post accordingly since without the wrong stuff it made less sense...
</added>

It should work - getting access to the referrer and then extracting the keywords from things like google isn't all that tricky.

If you are a technical person who can do code then its an hour or so worth of work, if not then I'm sure there are a multitude of similar, free, examples out there already.

- Tony

[edited by: Dreamquick at 2:32 pm (utc) on Dec. 9, 2002]

Key_Master

12:57 pm on Dec 9, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



It can be done with JavaScript. Try a search for document.referrer [google.com].