Forum Moderators: open
i use javascript for form validation etc... but would also like to pull in the ppc keywords into the form as well so when a user submits a form, the keyword and search engine will also appear.
thanks!
basically, the problem is i cannot get any analytics programs to work for me... urchin/log analysis/thank you page cookies/blah blah... none of them give me a simple answer to the following question:
who referred the customer to me (i.e. search engine) and what keyword did they search?
"conversion" on my site is very simple: a customer fills in a form and clicks submit. i then have a cgi script process the form and send me an email with all the fields they filled in. i want to also include in that email the referrer and keyword that got them there.
can you do this with javascript?
thanks!
<form name="aform" action=...>
<input ...>
<input type="hidden" name="referrer" value="">
<input ...>
</form>
<script>
document.aform.referrer.value=escape(document.referrer);
<script>
The other thing is to parse the referrer and to detect any search keywords. I recommend to do that on the server. Search engine query strings come in many varieties and your visitors would have to download a large piece of javascript to cover the major options.
no, i was just referring to the analytics that comes with the google adwords account... is that other one any good?
RonPK,
cool, thanks!
regarding parsing the query string, is there any way you could get javascript to just write the whole damn query string url to the form? i would happily "parse" it myself visually when i get the email as it is very low volume...
I only mentioned it because it supports regex filters to do things like map referrers or tracking parameters onto the pages report, so pages with different referrers or parameters are considered to be separate pages.
Add your order ID as a parameter when you call the form confirmation page, and perform a similar mapping to above, and each order confirmation is treated as a separate page.
You can then use the Urchin report that shows path through the site to show which keywords and referrers resulted in which orders without resorting to JavaScipt.