Event tracking library
- core/drupalSettings
- core/jquery
Load track_lib.js first, then in a seperate .js file, run the lines of code found in example.js.
<a data-track="track-link" data-object="Link" data-action="Clicked" data-description="View Menu" data-cuisine="Italian" data-neighborhood="Sherman Oaks">
View Menu
</a>
<button data-track="click" data-object="Button" data-action="Clicked" data-description="Hamburger Menu">
View Menu
</button>
<select data-track="dropdown" data-object="Dropdown" data-action="Changed" data-description="Neighborhood">...</select>
<input data-track="textfield_focusout" data-send-input-value="1" data-object="Textfield" data-action="Entered" data-description="Textfield">
data-send-input-value="1"
This setting will include the value of the text entered in the event call under the parameter "value"