Our master plan for DocSearch is to keep finding ways to add value to documentation and developer portals, so I think there's a good argument that this fits in
Right now we have a way to give analytics back to maintainers but not the public. We do this inside the Algolia dashboard. You can send a note to firstname.lastname@example.org and ask to have that turned on.
For a public widget, you can get at the autocomplete events today (the DocSearch client library is just a lightweight wrapper around autocomplete.js). Check out the Autocomplete options section of the DocSearch client documentation to see how to hook in.
For where to send the events, one API I would recommend is Keen IO. (Disclaimer: I used to work at Keen IO). Embedded data visualization is one of Keen's sweet spots and their free tier includes 50k events sent / month. Google Analytics is another option - the tracking will be easy but the embedding is a bit trickier.