GTM Search Insights - The method `sendEvents` doesn't exist

I did follow the guide here to integrate Search Insights with GTM Google Tag Manager | Algolia

All are fine, the events are getting fired in GTM debug console. However, from the browser console. It keeps raising the error The method sendEvents doesn't exist. and there is not any event coming to Algolia Events Debugger (while debug or after publishing the GTM).

Can anyone please help! what can be wrong here?
Thanks