Forum Moderators: open

Message Too Old, No Replies

can you add a parameter to the URL dynamically?

         

tonynoriega

5:08 pm on Oct 21, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



we currently use a parameter on one of our links to just track what type of applications we are processing:

reason=new
reason=upgrade
reason=downgrade

and those are hardcoded into the link itself, and we store those parameters in a dbase for reporting

i.e.: www.example.com/application.aspx?reason=new

if someone was coming to our site via referral, say another site www.exampleB.com could i somehow code into that page to say:

if referral is 'www.exampleB.com'

add reason=exampleB

to the URL parameter string..

or replace "new" with "exampleB" in the string?

my knowledge of cookies is very limited, but that sounds like i would have to put a cookie on the users browser to make that stick with them through the application process? which is 15 pages long.

Ocean10000

12:05 am on Oct 22, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Yes you could do something like that with javascript easy enough I would think.

marcel

6:56 am on Oct 22, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I'm not sure of what technology you are using (VB, C#) but you can query the referrer string on the landing page with Request.ServerVariables("HTTP_REFERER")

After filtering out the TLD you could then use a simple redirect to the target page. But you could also store the info in a session variable or cookie if you prefer.