Tracking Events via Scripting

In addition to the event itself, you can also pass additional information associated with the event from the same Zapp page. For example, consider a search on for which you would like to set an event on the Search button that sends the search expression as a value.


In order to do that, instead of using the “Track user events” option, you will need to use Capriza's scripting capabilities. Scripting will enable you to track the Search button click and send the event information as the click happens.

In the Web Properties tab, scroll down and expand the Override actions section.



Enable the Click override and enter the script that will send the track event with the additional value, in our example - the Search expression:


var value = window.document.getElementById('uh-search-box').value;

analytics.sendEvent('Search', value);;


Don’t forget to send the click itself and resolve the script.


For more information, please see Event Tracking and Implementing Event Tracking.


Was this article helpful?
1 out of 1 found this helpful
Have more questions? Submit a request


Please sign in to leave a comment.