Search conversions over time report broken

We recently migrated the search backend for a customer from native Shopify search to our in-house search. This customer does not use Hydrogen, so we had to integrate results from our search engine in the frontend using their Shopify theme. We did this by adding Javascript to the liquid template the renders the “/search” endpoint that essentially calls our search backend and replaces the native Shopify search results with our search results.

Now we’re noticing that the search conversions over time report is broken. The “sessions” value is non-zero, but all other values in the report are now zero.

Based on this note in the linked documentation:

To track storefront search in Shopify, your theme’s codebase must use the url property returned from search.results. All Shopify-developed themes are set up to track storefront search.

this isn’t really surprising. As part of the search result replacement, we are now using URLs generated by our search backend. Comparing the URLs generated by native Shopify search & our search backend, the only difference appears to be three query parameters injected by Shopify: _pos, _sid, and _ss

Since we’re still calling native Shopify search (it’s called server-side, so no way to disable it), we’re testing if it’s possible to fix the report by taking the _sid parameter returned by native Shopify search and appending it to our search result URLs. Our theory is that this is a “search ID” used by Shopify analytics to join product views with searches. However, this testing is very difficult & slow because Shopify states in the linked documentation that it can take up to 12 hours for events to be reflected in reports. Add in the fact that the reports only show aggregated hourly/daily totals and it becomes near impossible to debug how to fix Shopify’s search funnel tracking.

Has anyone dealt with a similar issue? Any advice on how to debug Shopify analytics or this issue in particular? Any info about how Shopify processes these tracking events in their backend when generating reports would also be very helpful!

I’ve been experiencing the same issue since the 3rd of July. And made no changes to the code. We’ve always used an external predictive search, but they claim this has nothing to do with them. Unfortunately, we have limited technical knowledge to figure out what caused this.

Hello @mike_vui ,

You are asking a great question to make me go through the Shopify API documentation extensively regarding reporting AND search results relationship. I am pretty sure it’s impossible to have your custom search results conversion tracking in the native report. Instead, I would suggest adding a UTM-tag to your search results URL and tracking this further in the Google Analytics results creating a custom report. I may actually assist with this easy setup.

Best regards,
Anastasia