Connecting Wix Site Search to GA4: tracking search queries as custom events
Module 67: Wix Site Search Optimisation | Lesson 680 of 688 | 27 min read
By Michael Andrews, Wix SEO Expert UK
Google Analytics 4 can capture every search query typed into your Wix Site Search bar, giving you a rich dataset of user intent signals directly from your own audience. The default GA4 site search tracking requires some configuration in both GA4 and your Wix settings. Once set up, you can see exactly what your visitors search for, how often, and what they do after searching — data that most businesses never fully leverage for SEO.
Enabling Site Search Tracking in GA4
Complete setup for GA4 site search tracking on Wix
- Open Google Analytics 4 and go to Admin > Property Settings > Reporting > Site Search.
- Enable the "Site search" toggle.
- Enter the query parameter used by Wix Site Search — this is typically "q" but verify by doing a test search on your site and looking at the URL (e.g. yoursite.com/search?q=testquery).
- Save the settings. GA4 will now automatically track the search_term parameter in the view_search_results event.
- Navigate to Reports > Engagement > Events and confirm that "view_search_results" events are being captured.
- Create a custom report in GA4 Explorations to see search terms alongside session metrics: bounce rate, conversion rate, and pages viewed per session after searching.
Creating Custom Events for Advanced Search Tracking
Beyond the standard view_search_results event, you can use Wix Velo to push custom events to GA4's data layer, capturing additional context like which category of results the user clicked on, whether the query returned zero results, and how far down the results page a user scrolled before clicking. This richer tracking data enables far more sophisticated content gap analysis.
// Wix Velo code to send custom search events to GA4
// Add to your search results page code
import { trackEvent } from 'wix-analytics-js';
$w.onReady(function () {
const searchQuery = new URLSearchParams(location.search).get('q');
if (searchQuery) {
// Check if there are any results
$w('#searchResults').onReady(() => {
const resultCount = $w('#searchResults').getCount();
if (resultCount === 0) {
// Track zero-results searches separately
trackEvent('zero_results_search', {
search_term: searchQuery,
result_count: 0
});
} else {
trackEvent('successful_search', {
search_term: searchQuery,
result_count: resultCount
});
}
});
}
});
Analysing Site Search Data for SEO Insights
- Top search terms with high volume and low click-through rates signal that your existing content does not match user intent
- Zero-results queries are direct evidence of content gaps — create pages targeting these topics
- Terms searched frequently but not targeted in your SEO strategy are keyword opportunities you are missing
- Queries that lead to high engagement after clicking suggest content that resonates — expand on these topics
- Seasonal patterns in search terms reveal when specific content needs to be published or promoted
How to Track Wix Site Search Events in Google Analytics 4
Correctly configuring GA4 to track Wix Site Search events gives you a continuous stream of data about what your visitors are looking for on your site.
Step-by-step GA4 site search tracking configuration for Wix websites
- Open Google Analytics 4 at analytics.google.com and navigate to your Wix site property.
- Click the gear icon at the bottom of the left menu to open Admin settings.
- Under Property settings, scroll to find "Reporting" and click "Site Search" to open the site search tracking settings.
- Enable the "Site search" toggle to turn on automatic query parameter tracking.
- Enter "q" as the query parameter — this is the default parameter used by Wix Site Search in the URL (e.g. yourdomain.com/search?q=yourquery).
- Click Save to apply the settings.
- Go to your live Wix site and perform three test searches to generate events.
- Navigate to GA4 Realtime reports and look for "view_search_results" events appearing in the event stream.
- After 24 to 48 hours, navigate to Reports > Engagement > Events and confirm that view_search_results events are accumulating.
- Open GA4 Explore and create a Free Form exploration with Search Term as the dimension and Event Count and Sessions as metrics to see your top search queries.
- Set up a custom GA4 Exploration specifically for site search data and save it so you can access it easily during your monthly content reviews.
This lesson on Connecting Wix Site Search to GA4: tracking search queries as custom events is part of Module 67: Wix Site Search Optimisation in The Most Comprehensive Complete Wix SEO Course in the World (2026 Edition). Created by Michael Andrews, the UK's No.1 Wix SEO Expert with 14 years of hands-on experience, 760+ completed Wix SEO projects and 435+ verified five-star reviews.