How to track searches?

The site I’m building has a jquery based search input that hides or shows elements that match whatever you type in:
http://pieline.net/

There’s no submit button - results are displayed in real time.
Is there any way to track what users are typing into this box? Something to do with custom variables maybe?
Thanks

Hi there,

To track such events, we recommend to use Event Tracking Event Tracking - Analytics Platform - Matomo