StoreRocket tracks how visitors interact with your store locator out of the box. You can see what people are searching for, which locations get the most attention, and which websites are driving the most traffic to your widget.
Built-in analytics dashboard
Go to your Analytics page to see an overview of your widget's performance. You can adjust the date range to look at specific time periods.
Here's what StoreRocket tracks:
Metric | What it means |
Widget views | How many times your store locator was loaded on a page |
Searches | How many times a visitor searched for a location |
Clicks | Interactions with location cards (directions, phone, website, CTA buttons) |
Popular locations and websites
See which stores get the most views and clicks, and which pages your widget is embedded on that drive the most traffic. Great for understanding demand across your network.
Search data
You can see exactly what visitors are typing into the search box. Common patterns include city names, zip codes, and "near me" style searches. Export search data as CSV for deeper analysis.
Custom JavaScript events
StoreRocket fires custom JavaScript events on the page whenever visitors interact with your store locator. You can listen for these events and forward them to any analytics platform: Google Analytics 4, Google Tag Manager, Mixpanel, Segment, Plausible, or anything else.
Events available
Event name | When it fires | Data included |
| Widget loads on the page | None |
| Visitor performs a search |
|
| Visitor clicks on a location |
|
Which setup do you have?
Before adding the snippet, check how GA4 is installed on your site:
Standalone GA4 (you added the gtag.js snippet directly to your site) β use the GA4 section below.
Google Tag Manager (you manage GA4 through a GTM container) β use the GTM section below. This includes Shopify stores using Elevar, Analyzify, or similar apps.
Not sure? Open your browser console and type typeof gtag. If it says "function", you have standalone GA4. If it says "undefined", your GA4 likely runs through GTM.
Sending events to Google Analytics 4 (standalone)
This works when GA4 is installed directly on your page (not through GTM). Add this snippet after your GA4 tag:
<script>
document.addEventListener('storerocket-storelocator-load', function() {
gtag('event', 'storerocket_view');
});document.addEventListener('storerocket-storelocator-search', function(e) {
gtag('event', 'storerocket_search', { search_term: e.detail.query });
});document.addEventListener('storerocket-storelocator-click', function(e) {
gtag('event', 'storerocket_click', {
location_id: e.detail.location_id,
click_type: e.detail.click_type
});
});
</script>Events will show up in GA4's Realtime report within seconds.
Important: If you see gtag is not defined in the console, your GA4 runs through GTM. Use the GTM section below instead.
Sending events to Google Tag Manager
If GA4 is managed through GTM, the gtag() function is not available on your page. You need to push events to the dataLayer and set up triggers in GTM. There are two steps.
Step 1: Add this snippet to your page (after the StoreRocket embed script):
<script>
window.dataLayer = window.dataLayer || [];document.addEventListener('storerocket-storelocator-load', function() {
dataLayer.push({ event: 'storerocket_view' });
});document.addEventListener('storerocket-storelocator-search', function(e) {
dataLayer.push({
event: 'storerocket_search',
search_term: e.detail.query
});
});document.addEventListener('storerocket-storelocator-click', function(e) {
dataLayer.push({
event: 'storerocket_click',
location_id: e.detail.location_id,
click_type: e.detail.click_type
});
});
</script>This pushes events into the dataLayer. On its own, this is not enough. You also need to tell GTM what to do with these events.
Step 2: Create triggers and tags in GTM.
Go to your GTM container and create three Custom Event triggers (Triggers > New > Custom Event):
Event name:
storerocket_viewEvent name:
storerocket_searchEvent name:
storerocket_click
Create three Data Layer Variables (Variables > New > Data Layer Variable):
Variable name:
search_termVariable name:
location_idVariable name:
click_type
Create three GA4 Event tags (Tags > New > Google Analytics: GA4 Event):
Tag 1: Event Name =
storerocket_view, Trigger = storerocket_viewTag 2: Event Name =
storerocket_search, Trigger = storerocket_search. Add event parameter:search_term= your search_term variable.Tag 3: Event Name =
storerocket_click, Trigger = storerocket_click. Add event parameters:location_idandclick_typeusing your variables.
Use GTM Preview mode to verify events fire when you interact with the store locator, then Publish.
Both steps are required. The snippet alone will not send events to GA4 without the GTM triggers.
UTM parameters
StoreRocket doesn't pass UTM parameters through to location clicks natively. If you need UTM tracking, use the UTM parameters on the page where your widget is embedded. Since GA4 tracks the page URL including UTMs, your widget events will be associated with whatever campaign brought the visitor to that page.
Troubleshooting
Analytics showing no data
Give it at least 24 hours. If you just installed the widget, there might not be enough data yet. Also verify your embed code is correctly installed. Check the Widget Preview to make sure everything loads.
Numbers seem low
Check the date range, make sure all pages have the correct embed code, and note that heavy website caching can affect view counts.
Custom events not showing in GA4
Check if you're using GTM or standalone GA4. Open the browser console and type
typeof gtag. If it says"undefined", you're on GTM and must use the GTM setup (dataLayer.push + triggers). The gtag() snippet will not work.Verify the events fire. Open the browser console and type
document.addEventListener('storerocket-storelocator-load', function() { console.log('it works'); })then reload. If you see "it works", the events are firing correctly.If using GTM: Make sure you completed both steps (snippet on the page AND triggers in GTM). The snippet alone does nothing without GTM triggers. Use GTM Preview mode to verify events appear in the debug panel.
If using standalone GA4: Make sure the snippet is placed after your GA4 tag on the page. Check the console for
gtag is not definederrors.Check GA4's Realtime report after searching for a location.
Questions? Hit us up on live chat.