How to enable analytics track events using DocSearch UI

Hi folks,

I’m using Docsearch for my search UI, and I would like to enable the analytics events to track the CTR and other useful metrics. How could I do that? I didn’t find any docs related to that.

Thanks in advance for your help.