Context:
I have a Gatsby and Strapi-based application where we’ve recently integrated search functionality using MeiliSearch. The current setup is working fine for displaying search results, but now I want to enhance this by tracking what users are searching for on my website.
Requirements:
Track User Search Queries: I want to capture the keywords or search terms users enter in the search bar.
Store and Analyze Search Data: I need to store this search data to understand user behavior and preferences.
Integration with Existing Analytics: If possible, integrate this search tracking with Google Analytics, as it already tracks other user interactions on the site.
Is there a feature or a method in Google Analytics to directly capture and store search queries from the search bar in my application?
If yes, what specific settings or configurations are needed to enable this tracking?