Follow

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 google.com 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.

Screen_Shot_2017-05-25_at_5.50.27_PM.png

 

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);

element.click();

resolve();


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

0 Comments

Please sign in to leave a comment.