Forum Moderators: open
I have a search box that has a single input field and a submit button. When the submit button is pressed, an onClick event calls Google's urchinTracker.
I'd like to append whatever variable is put in the search box, to the onClick event so I can see it in Google Analytics:
<input name="searchterm" type="text">
<input type="submit" name="Submit" value="Submit" onClick=\"javascript:urchinTracker ('/siteSearch_SEARCHTERM_GOES_HERE'); >
Is this possible using JavaScript? Thanks in advance for any replies.