Every time a shopper searches on your site, EasyFinder sends an event with useful info: what they searched for, how many results they saw and how many filters they used. With a little setup in Google Tag Manager (GTM), you can capture all of it and forward it to the tools you use, like Google Analytics, Meta Pixel or any other tag.
Before You Start #
Google Tag Manager needs to be installed on your site. If it isn’t yet, set that up first by following Google’s quick-start guide.
What EasyFinder Sends #
When a shopper searches, EasyFinder pushes this event to the data layer:
// Example event from EasyFinder
{
event: "view_search_results",
search_term: "running shoes",
ef_total_exact_results: 24,
ef_total_relaxed_results: 4,
ef_total_active_filters: 2,
ef_search_method: "overlay",
ef_source: "easyfinder"
}
The event is sent once the shopper stops typing and the results have been on screen for about two seconds, or right away when they press Enter. Someone typing “running shoes” sends one event, not one for every letter.
Here’s what each field means:
| Field | What it tells you |
|---|---|
search_term | The word or phrase the shopper searched for. |
ef_total_exact_results | How many of the results on screen match the search exactly. Counted over the results shown, up to 28 at a time. It is not the total number of matching items in your catalog. |
ef_total_relaxed_results | How many extra results are shown next to the exact matches, for example when only a few items match the search. Counted over the results shown, up to 28 at a time. It is not the total number of matching items in your catalog. |
ef_total_active_filters | How many filters the shopper had switched on at that moment. |
ef_search_method | Where the search happened. Currently always overlay: the EasyFinder search window. |
ef_source | Always easyfinder. Handy to tell these events apart from other search events. |
Step 1. Open Google Tag Manager #
Log in to tagmanager.google.com and open the container connected to your website.
Step 2. Add the EasyFinder Fields as Variables #
GTM needs to know which fields to read from the event.
Go to Variables → New → Data Layer Variable. Create one variable per field, and fill in the Data Layer Variable Name exactly like this:
search_termef_total_exact_resultsef_total_relaxed_resultsef_total_active_filtersef_search_methodef_source
Give each variable a clear name, such as DLV search_term, and save.
Step 3. Create a Trigger #
Now tell GTM when to react.
Go to Triggers → New → Custom Event and fill in:
- Event name:
view_search_results - This trigger fires on: All Custom Events
Save it as CE view_search_results.
Step 4. Create a Tag #
Now build the tag that sends the event to the tool of your choice. The most common setup is a Google Analytics (GA4) tag.
Go to Tags → New → Google Analytics: GA4 Event and fill in:
- Measurement ID: your GA4 ID, which looks like
G-XXXXXXX - Event Name:
view_search_results
Under Event Parameters, add a row for each field:
| Parameter Name | Value |
|---|---|
search_term | {{DLV search_term}} |
ef_total_exact_results | {{DLV ef_total_exact_results}} |
ef_total_relaxed_results | {{DLV ef_total_relaxed_results}} |
ef_total_active_filters | {{DLV ef_total_active_filters}} |
ef_search_method | {{DLV ef_search_method}} |
ef_source | {{DLV ef_source}} |
Under Triggering, pick the CE view_search_results trigger and save the tag.
Step 5. Test and Publish #
Click Preview in GTM and open your site. Search for something and wait two seconds, or press Enter. Check that the event fires and that all values look correct.
When everything looks good, click Submit and publish your container.
view_search_results exactly. It’s case-sensitive.That’s it. Your EasyFinder events now flow through Google Tag Manager, ready to be used in any tool you connect.