yep.
change ur page to being PHP, then use $_GET["source"] to add the value 2 whatever fields u want
i luv PHP (and formmail too!)![]()
get a book or hire a programer if u need to (its a real quick job)
Welcome to the Tectite Forums! You can download and get support for our free PHP FormMail (form processor) and other free software.
Is there a way to grab the actual URL that is displayed in the Browser address bar and pass it thru in form results? I don't mean the hidden field actual 'camefrom' code, but the actual address in the address bar in the browser window.
Why? Sometimes i will do a sponsored page like for example, let's say i have a page called www.mysite.com/signup.html but the actual URL if clicked from a PPC ad would look like this... www.mysite.com/signup.html?source=googleppc and in that case i'd like to record the actual URL in the address bar to grab the source data and send it thru in form results so that I know it came from a paid google ppc click.
I know this is getting a little into click tracking etc, but i was wondering if there is a code i can customize into the form to grab the URL shown in actual address bar?
yep.
change ur page to being PHP, then use $_GET["source"] to add the value 2 whatever fields u want
i luv PHP (and formmail too!)![]()
get a book or hire a programer if u need to (its a real quick job)
Thanks for the tip, i'm a big PHP fan too, but some of my client sites have to remain HTML pages where the forms are (for various reasons). Is there anyway to do it with a HTML page, like a hidden field code that records the address bar or maybe a javascript?
i dont understand. php pages are html.have to remain HTML pages where the forms are (for various reasons)
i'd be interested to hear the reasons why u cant use php.
yes, i think u can use javascript to get the url info.
Well yes they are in a way, but i have to keep the form on a .html on the page for some clients (can't change the extension to .php). I have valid reasons for this, but won't get into them here.
Can i use the $_GET["source"] in the actual formmail.php file or maybe a referrer command?
Last edited by enicola; 26-Apr-2007 at 10:29 PM.
too late once it gets to formmail
u have to grab it on the page that has that url
yes, that's what i figured, i'll see what i can do with a javascript.
Hooray! looks like i got the URL in address bar to show in the 'referring page' form results and it grabs the ?source= stuff.
Now this shows in the formmail error page, how can i get that same data into the formmail results page (when there is no error and form processes ok)
Last edited by enicola; 27-Apr-2007 at 03:10 AM.
ok, got it! Russell just told me to add hidden field for referrer like this (also shows ip and browser too).
<input type="hidden" name="derive_fields" value="ipaddr = REMOTE_ADDR,
browser = HTTP_USER_AGENT, referrer = HTTP_REFERER" />
what's great about this is not only does it show the webpage address referred from, but it can also show the source of your PPC campaign click if you tweak your campaigns link a little (like google adwords) it can reveal it's source from google. To do this in Google PPC and others, just change your page URL on the ppc ad from www.yoursite.com/yourpage.html to www.yoursite.com/yourpage.html?source=googleppc and then when your visitors clicks from PPC to your form page, they fill out your form and you get the referrer page data in your email results showing it came in from a google click like this...
ipaddr: xx.xx.xx.xx
browser: Mozilla/5.0
referrer: www.yoursite.com/yourpage.html?source=googleppc
when a visitor uses that same page from an organic/natural search and fills in it would just show the normal url, like this...
ipaddr: xx.xx.xx.xx
browser: Mozilla/5.0
referrer: www.yoursite.com/yourpage.html
it's a good way to quickly know if you paid for the inquiry via PPC or not, of course i would still recommend using your ppc click tracking tools too, but this is very cool!
Last edited by enicola; 27-Apr-2007 at 03:47 AM.
of course!
i sholud have thought of that, sorry.![]()
did u subscribe? i didnt see ur post on the subscription forum
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks