Optimising Your GA4 Tracking for the Uberall Self-Service Locator
Table of Contents
To ensure your analytics data is accurate and free of duplicates, it’s important to configure your Google Analytics 4 (GA4) tag specifically for the Uberall Self-Service Locator.
Because the Uberall Locator operates as a Single Page Application (SPA), it manages navigation dynamically without reloading the entire page. Our system is designed to manually send page_view events to your GA4 property to ensure every interaction is captured. However, the standard GA4 installation also sends an automatic page view when the script loads, which can lead to double-counting your data.
Follow this guide to adjust your implementation for clean, precise reporting.
The Adjustment: Disabling Automatic Page Views
To prevent duplicate tracking, you need to add a specific flag—send_page_view: false—to your GA4 configuration snippet. This tells Google Analytics to wait for the manual trigger from the Uberall Locator rather than firing an event immediately upon page load.
Standard Setup (Do not use)
Usually, a standard GA4 snippet looks like this:
HTML
<script async src="https://www.googletagmanager.com/gtag/js?id=TAG_ID"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'TAG_ID');
</script>
Required Setup for Uberall
You must modify the gtag('config', ...) line to include the disable flag as shown below:
HTML
<script async src="https://www.googletagmanager.com/gtag/js?id=TAG_ID"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
// Add the { send_page_view: false } flag here:
gtag('config', 'TAG_ID', { send_page_view: false });
</script>
Why is this necessary?
- Accuracy: By adding { send_page_view: false }, you ensure that the only page_view events recorded are the ones sent directly by the Uberall Locator application.
- User Journey Integrity: In an SPA environment, traditional page loads don't happen when a user searches for a location or views a pin. Our manual triggers capture these "virtual" page views correctly.
- Compliance with Best Practices: This method aligns with Google's official developer documentation for handling manual event measurement.
Implementation Checklist
- Locate your GA4 global site tag in your website's <head> section.
- Replace the TAG_ID placeholder with your actual Google Measurement ID (e.g., G-XXXXXXXXXX).
- Update the configuration line to include the send_page_view: false parameter.
- Publish your changes and verify the real-time data in your Google Analytics dashboard.
Note: If you are using Google Tag Manager (GTM) instead of a hardcoded gtag.js script, you will need to adjust the "Google Tag" configuration settings within the GTM interface to disable "Send a page view event when this configuration loads."