Why track quick returns?
When a visitor clicks a link, lands on a page and goes straight back, the content does not meet their expectations: the link title promised something else, the image was misleading or the loading time was too long.
Yet GA4 does not count this behavior as a particular event. As far as it is concerned, the navigation goes on normally when there is probably room for improvement!
Set up the tracking
The principle relies on a light script: it records the page and the time the visitor arrived. If the visitor goes back in under 5 seconds, a back_navigation event is sent to GA4 with the page left.
Step 1: Add the script in GTM
In Google Tag Manager, go to Tags > New, choose the Custom HTML type and paste the script below. Fire this tag on All Pages.
<script>
(function () {
var KEY = 'saved_page';
function read() {
try { return JSON.parse(sessionStorage.getItem(KEY)); } catch (e) { return null; }
}
function check(back) {
var before = read();
if (back && before && before.path !== location.pathname && Date.now() - before.time < 5000) {
window.dataLayer = window.dataLayer || [];
window.dataLayer.push({ event: 'back_navigation', page_left: before.path });
}
try {
sessionStorage.setItem(KEY, JSON.stringify({ path: location.pathname, time: Date.now() }));
} catch (e) { }
}
var nav = performance.getEntriesByType('navigation')[0];
check(!!nav && nav.type === 'back_forward');
window.addEventListener('pageshow', function (e) {
if (e.persisted) check(true);
});
})();
</script>
Step 2: Get the page left
Go to Variables > New, choose the Data Layer Variable type and enter page_left as the variable name. Name it Back navigation - page left.
Step 3: Send the event to GA4
- Create a trigger of type Custom Event with
back_navigationas the event name. - Then create a GA4 event tag with the same event name (
back_navigation). - Add the event parameter
return_pageand associate the variable created in step 2 with it, then link everything to the trigger.
Step 4: Register the dimension in GA4
In GA4, go to Admin > Data display > Custom definitions and click Create custom dimension:
- Dimension name: Return page
- Scope: Event
- Event parameter:
return_page
Step 5: Test
Start preview mode in GTM, open a page of your site, navigate to a second page, then immediately click your browser's back arrow. The back_navigation event should appear in the preview log.
Analyze the back navigations in Google Analytics
Open the Explore menu, create a Free form exploration and set it up as follows:
- Dimensions: Return page
- Metrics: Event count
- Filters: Event name exactly matches
back_navigation
Then sort the results in descending order to identify the pages that generate the most quick returns.
💡 Analysis tip: a high-traffic page mechanically generates more returns than a low-traffic one. Cross this volume with the total views of each page to qualify your conclusions.
How to use this data?
- Adjust the source link or the title: if a page is deserted at once, the promise shown upstream does not match the reality of the content.
- Rethink the first screen (Above the fold): bring the key information or the main value proposition to the very top of the page to capture attention immediately.
- Check technical performance: if the returns come mostly from mobile users, add the Device category dimension to your exploration to check whether the quick bounce comes from slow display.
Tools
- Google Tag Manager: Custom HTML tag, Data Layer variable, Custom Event trigger, preview mode.
- Google Analytics 4: custom dimension, free form explorations.
Measuring what GA4 does not report on its own is part of the tracking expertise.