Google Analytics not recognizing default Algolia search query parameter

Hello,

I am using this guide to set up Algolia site search events on Google Analytics. The trouble is that GA does not seem to recognize my search query parameter.

Generally your docs suggest that if your search url looks like: /search?q=cool+product then the query parameter should be set up as q in GA.

The trouble is that my search url looks like this: /search?products_en_sandbox[query]=cool+product with the products_en_sandbox being the name of the Algolia index I am searching against. This is just the basic format for URL syncing provided by Instantsearch.js.

I have tried setting up my query parameter in GA as products_en_sandbox, products_en_sandbox[query] and several other variations, but none have been successfully recognized and I am still showing 0 search events in GA.

Given my search URL (listed above), can you tell me what I should use for the query parameter in GA? I would prefer not to have to resort to manual routing if possible.

Thanks!

Hi @project.dmc

I’m doing some digging internally, but when I look at a sandbox for simple routing, I notice the square brackets are url encoded https://xeinx.csb.app/?instant_search%5Bquery%5D=hello

Have you tried products_en_sandbox%5Bquery%5B as the query parameter?