Start GA4 site search tracking by searching your own store on a phone. If the results URL contains the words you typed, GA4’s enhanced measurement can often collect them automatically. If the results appear in a drawer while the address stays the same, your developer may need to send an event when the results appear. In both cases, check one known search end to end before using the figures to change your catalogue.
What exactly should appear in Analytics?
Suppose a shopper types “brass diya” into your store. A results view can generate an event called view_search_results. Its search_term parameter supplies the text for the Search term dimension. That tells you what the shopper looked for inside your store. To find out whether the store returned a matching product, you also need evidence from the storefront. A recorded search by itself says nothing about stock or the number of results. Google’s enhanced measurement reference.
How do you set up GA4 site search tracking?
- Use an ordinary product phrase and submit it on desktop and mobile. Record the final address and whether the results are a new page or an overlay. A desktop theme and a mobile search app may behave differently.
- In GA4 Admin, open Data streams, select the correct web stream and inspect Site search in its enhanced measurement settings. Google recognises
q,s,search,queryandkeywordby default. For a URL such as/find?phrase=brass+diya, configurephraseas a search term query parameter. - If the URL carries no term, ask the storefront developer to send the event when the submitted search finishes rendering. Decide whether autocomplete suggestions count separately. Counting each keystroke as a completed search would inflate the totals.
- Check what free text and page URLs can contain before enabling collection. Visitors sometimes enter email addresses, phone numbers or order details. Keep those values out of Analytics, including the page location and any custom parameters. Google’s guidance on user-entered information.
How can you check the event before trusting a report?
Enable debug mode on a test device using Tag Assistant, then open DebugView. Submit a distinctive, harmless term once. Inspect the event name and the search term. Repeat with a deliberately unavailable product. Count how many events arrive for each action. If both your theme and Tag Manager send the same result view, resolve which implementation owns it before comparing weeks. Google’s DebugView instructions.

Where can you see the terms and the empty searches?
In Explore, create a free-form exploration with Search term as the row and Event count as the value. Filter Event name to exactly view_search_results. Compare a few rows with your test searches. Google lists Search term as a dimension populated from the event parameter. GA4 dimension definitions.
To measure empty searches, have your search application record the number of matches it actually returned, or a simple outcome such as “results” or “empty”. This is an additional implementation choice. Treat a failed request, a slow response and a true zero as separate outcomes. If an outcome is missing, keep it unknown.
Hypothetical example. A homewares merchant records 100 completed searches on mobile. Eight return zero matches, 72 return products and 20 have no recorded outcome. The empty-search rate among known outcomes is 8 ÷ 80, or 10%. Outcome coverage is 80%. Reporting those two numbers together makes the missing data visible. Before comparing devices, check that both versions of the store report outcomes the same way.
What should the merchant change?
Replay a common empty search while the relevant products are in stock. If “brass diya” returns nothing but “brass oil lamp” finds the product, test a catalogue synonym. If both return nothing and the store does not carry the item, log a merchandising question. If the item appears below several unrelated products, investigate result ordering. These cases can look identical in a list of popular terms.
Keep a short test record: phrase, device, expected item, stock state, result count, first relevant result, proposed change and retest date. Recheck the same phrase and a neighbouring phrase after the change. Once a shopper reaches a product, follow the checkout journey separately. Digi Amenity’s Shopify abandoned checkout guide covers that later step.
Frequently asked questions
Does search frequency tell me how many shoppers wanted a product?
One shopper can submit several searches or try different spellings. Event count describes activity. Use it to prioritise a replay before making a buying decision.
Why does mobile show fewer searches than desktop?
Try the same phrase on each device. If the mobile theme uses a drawer and desktop opens a results URL, one path may have tracking while the other still needs an event.
Should I record a search when someone taps a suggestion?
If the tap opens a product directly, measure the selection separately. If it opens a results page, apply the same completed-results definition used elsewhere.
Why does my results page show products even when the query has no matches?
Some stores show fallback recommendations. Ask the search application for the count of actual matches before recommendations are added. Otherwise the fallback can hide a failed product search.
Can I use search terms to improve product titles?
Compare the phrase with the product’s actual material, size and use. A synonym may help discovery without changing the title. Only add wording that accurately describes the item.
If shoppers repeatedly search for products you already stock, Digi Amenity’s web development team can trace the mobile search, events and catalogue matching together to identify the first point of failure.