|P is for Practical|
Pushing along the Query_Stringby peppiv (Curate)
|on Jul 08, 2003 at 12:52 UTC||Need Help??|
peppiv has asked for the
wisdom of the Perl Monks concerning the following question:
We recently got a new director who's doing R&D for some Internet stuff and he's a bit of an asp lover. After I stopped laughing I set out to show him the power of PERL. So here's our first project - Set up some Google Ad Campaigns and create some web pages promoting one of our new services.
Easy enough. But then I thought, there's got to be a good way to track all these visits by various keywords and campaigns. So they're all pointing to a Perl script that slurps the Query_String (from the Google Ad Campaign) and points the requests to the proper destination. The Query_String is also split into its constituent parts and stuffed into a DB. Good so far. Then I thought I'd like to push along the Query_String to maintain some sort of state and measure the depth of each visit.
There is an initial landing page which I move the Query_String over by:
Where $Landing_1 is the URL and $id is a timestamp (we're not looking for 100% accuracy).
Viewers have now clicked on a Google Ad Campaign and are peacefully resting on our initial landing page with the Query_String in tow. (eg. http://www.newservice.com/vacation_offer.html?src=google&c=D1&ag=2&kw=discount+family&id=1057667802) Here's where I faulter.
On this page I have a form that requests the user to choose the state she or he lives in. This is required by our legal team because we're not allowed to offer this service to various states. Once they do the drop down menu and submit, and they are welcomed, I relocate them to another page but I'd like to carry over the Query_String. So I tried this:
The script accepts the state value with:
And based upon it's condition it is passed to the $Landing_2. But when the $Landing_2 comes up, the Query_String does not follow. $Landing_2 is a short request form. I need them to fill this out and go on to $Landing_3. I would like to push the Query_String along yet again.
What I'm trying to achieve is when I go to $Landing_2, I'd like to bring along the ID so I can Update my DB with this new depth level. And again when I go to $Landing_3.
I am not interested in using Cookies at this point.
My questions boils down to this. Does form submission eradicate the Query_String? If using POST?