Tracking Locator Events in Google Analytics

Receive store locator events in GA4 (and others) to turn a store search into a conversion.

Your locator sends an event for every meaningful visitor interaction. This guide covers how to receive those events in GA4 and turn a store search into a conversion.

Overview#

The locator automatically sends events to any supported tag already on the page:

  • Google Analytics 4, via gtag

  • Meta Pixel, as custom events

  • TikTok Pixel, as custom events

There is nothing to configure on our side.

The locator sends events to the tags it finds. It does not install them for you. Your tag must already be present on the page hosting the locator, or the events are discarded silently.

What We Send#

EventFires whenParameters

StoreLocators_session_start

the locator loads

StoreLocators_stores_request

a visitor searches for stores

postalCode and country, or latitude and longitude

StoreLocators_visible

the map scrolls into view

StoreLocators_get_directions_modal

Get Directions is clicked

retailer, store_id

StoreLocators_call_store

a store phone number is clicked

retailer, store_id

StoreLocators_buy_now

Buy Now is clicked

retailer, store_id, product_id

StoreLocators_add_option

a product filter is applied

option

StoreLocators_remove_option

a product filter is removed

option

StoreLocators_click

pin clicks, store selections, filter interactions

event, plus retailer and store_id

StoreLocators_click covers several interactions. The event parameter names the specific one: show_location, click_pin_near, click_pin_far, open_filter, apply_filter, toggle_product, toggle_store_logo.

retailer arrives as our internal identifier, such as whole_foods, farm_boy, or walmart_ca.

Setting Up Conversion Tracking#

Most brands treat a store search as the conversion. That is StoreLocators_stores_request.

Step 1: Confirm the events are arriving#

Open your locator page alongside GA4 → Reports → Realtime. Run a postal code search and click a store pin. Within about 30 seconds, you should see StoreLocators_stores_request and StoreLocators_click in the event list.

If nothing appears, check how your tag is installed:

Direct gtag.js

If your GA4 tag is a gtag.js snippet in the page source, confirm it loads on the locator page specifically, not only on your other pages.

Open the browser console on your locator page and run:

javascript
typeof window.gtag

It should return "function". If it returns "undefined", the tag is not on that page.

Google Tag Manager

Google's current tag template exposes gtag to the page, so in most GTM setups the events arrive with no extra work. Confirm with the console check first.

If they do not arrive, see Using Google Tag Manager below for the bridge snippet and trigger setup.

Step 2: Mark it as a key event#

In GA4, go to Admin → Data display → Events, find StoreLocators_stores_request, and toggle Mark as key event. It will now appear as a conversion in your reports.

New events can take up to 24 hours to appear in this list. To skip the wait, create the event manually under Admin → Data display → Custom definitions.

Step 3: Register the parameters you want to report on#

GA4 collects event parameters but will not break them out in reports until you register them. Under Admin → Data display → Custom definitions → Create custom dimension, add the ones you care about, scoped to Event:

  • retailer to see which retail partners drive the most interest

  • postalCode to see where demand is concentrated

  • event to break StoreLocators_click into its individual actions

Step 4: Import the conversion into Google Ads (optional)#

If you run Google Ads, link your GA4 property and import the key event as a conversion. You can then optimize campaigns toward store searches, and build remarketing audiences from visitors who looked for a store near them.

Using Google Tag Manager#

Only needed if Step 1 showed no events arriving. This snippet forwards our events into your data layer.

html
<script>
  window.dataLayer = window.dataLayer || [];
  if (typeof window.gtag !== 'function') {
    window.gtag = function (type, name, params) {
      if (type === 'event') {
        window.dataLayer.push(Object.assign({ event: name }, params || {}));
      }
    };
  }
</script>

Then in GTM:

  1. Create a Custom Event trigger. Set Event name to ^StoreLocators_ and tick use regex matching.

  2. Create a GA4 Event tag. Set Event Name to {{Event}} and attach the trigger above.

  3. Add Data Layer Variables for event, retailer, store_id, product_id, and postalCode, then map them as event parameters.

  4. Preview, click through your locator, then publish.

Every page hosting a locator needs its own tag and, if you use it, this snippet. Regional pages such as a retailer-exclusive landing pages are easy to miss.

Meta and TikTok#

No setup is required beyond having the pixel on the page. The same events arrive as custom events named StoreLocators_*.

Because they are custom events, define custom conversions or audiences in Meta Events Manager and TikTok Events Manager before using them for reporting or retargeting. A store search is a strong retargeting signal, so this is usually worth doing.

Troubleshooting#

No events in GA4 Realtime
  • Confirm your GA4 tag is on the locator page itself, not only on other pages.

  • Disable ad blockers and privacy extensions. They block analytics requests and make it look like nothing is firing.

  • If you use a cookie consent banner, accept analytics cookies before testing.

  • Run typeof window.gtag in the console. It should return "function".

  • On Shopify, the tag must be in your theme. Tags added under Settings, Customer events run sandboxed, so the locator cannot reach them.

Events arrive but parameters are missing

Register them as custom dimensions, per Step 3. Unregistered parameters are collected but not reported.

Events arrive on one locator page but not another

Each page hosting a locator needs the tag present. Check regional or retailer-specific locator pages individually.

Nothing works and your installation is older

Event tracking requires a current locator script. If your installation was pinned to a specific version, contact us and we will update it.

Looking in the wrong report

A brand new property shows nothing under Reports or Home for up to 24 hours. Use Admin, Data display, DebugView if your tag sets debug_mode, or Reports, Realtime otherwise.

window.gtag says function but nothing arrives

That check alone may not be conclusive. The inline part of the Google tag snippet defines gtag itself, so it returns function even when gtag.js was blocked and never ran. Events then pile up in dataLayer and are never sent. Check typeof window.google_tag_manager instead. If it is undefined while the snippet is present in your page source, the tag was blocked. Retest in a clean browser profile with no extensions.

Support#

If you have questions or run into any issues with the information provided on this page, reach out to Anthony, our Customer Success Manager, (anthony@storelocators.com) and he will help you get everything configured correctly.

Installing The LocatorThis guide covers how to install and customize our locator on your site.
Retailer-Exclusive Landing PagesCreate retailer-specific store locator pages that guide customers to selected retail partners and locations
ESC

Type to search across all docs

+Kto toggle