I need to load a tracking image at the same time a button is clicked on a travel search widget. This will allow me to track the # of searches initiated from the widget. I have been told that using a javascript onsubmit function is the best way to do this. The $20 will be sent once the 3rd party confirms the code works. This would be early next week. Below is the code and an example of the tracking image. <FORM NAME=HotForm ACTION="http://example.com" METHOD=get> <INPUT name=eapid type=hidden value="22436-30021"> <INPUT TYPE=HIDDEN NAME=GOTO VALUE="HOTSEARCH"> <INPUT TYPE=hidden NAME=rfrr VALUE="-34980"> <INPUT TYPE=hidden NAME=olid VALUE=""> <INPUT TYPE=hidden NAME=mdpcid VALUE="22436-30021.0.1"> Code (markup): Tracking Image <img height="1" width="1" src="http://example.com/tracking-image"/> Code (markup): PM or post below with questions.
Personally, I would just have the search parsing script log the number of hits while the search results are being pulled up. What if users search without having javascript enabled? You'd have an inaccurate count.
The search criteria is being submitted to a 3rd party so we have no way to tally the count. Traffic will be generated from PPC and this will allow us to track the number of searches initiated. Not great but it's what we have to work with.