Improving your websiteβs conversion rate doesnβt always require a full redesign or months of A/B testing. Sometimes, itβs about spotting and fixing the obvious friction points that frustrate your users.
β
In this guide, weβll cover six simple things you can track using Google Tag Manager (GTM) that can lead to quick, meaningful conversion wins.
Jump to a section:
β404 Page Views
JavaScript ErrorsRage ClicksDead ClicksOut-of-Stock Product ViewsSlow Loading Pagesβ
βWhy track it?
Landing on a 404 page is a huge trust-breaker. It interrupts user flow and can cause immediate exits.
βHow to track it in GTM:
βCreate a Trigger: Trigger Type: Page View, Condition: Page Path or Page Title contains 404
or matches your site's 404 URL.
Fire a GA4 Event: Send an event like page_404_viewed
to highlight how often this happens.
βPro Tip:
Set up an alert if 404 rates spike.
β
<script>
// 404 page detection
if (document.title.includes('404') || window.location.pathname.includes('404')) {
window.dataLayer = window.dataLayer || [];
window.dataLayer.push({
event: '404_page_view',
page_path: window.location.pathname,
page_title: document.title
});
}
</script>
(Trigger this on All Pages or DOM Ready in GTM)
β
βWhy track it?
If core site features break (like forms or checkout buttons), users canβt convert β and many will leave without telling you.
βHow to track it in GTM:
βEnable GTMβs Built-In Variable: Error Message, Error URL.
Set up a Custom Trigger: Trigger Type: JavaScript Error.
Fire a GA4 Event: Send an event like js_error_occurred
with the error message as a parameter.
βPro Tip:
Filter out non-critical errors to focus on the ones that affect user journeys.
<script>
// JavaScript error tracking
window.onerror = function (message, source, lineno, colno, error) {
window.dataLayer = window.dataLayer || [];
window.dataLayer.push({
event: 'javascript_error',
error_message: message,
error_source: source,
error_line: lineno,
error_column: colno
});
};
</script>
(Load once globally β auto captures all errors)
β
βWhy track it?
Multiple rapid clicks on the same spot often signal broken elements or confusing UX.
βHow to track it in GTM:
βSet up a Click Trigger. Use a variable (like Click Classes or Click ID).
Use a Timer or Custom JavaScript to detect >3 clicks on the same element within a short time (e.g., 2 seconds).
Fire a GA4 Event: Name it something like rage_click_detected
.
βPro Tip:
Combine rage click data with session recordings for deeper insights.
<script>
// Rage click detection
(function() {
let clickCount = 0;
let lastClickTime = 0;
let lastTarget = null;
document.addEventListener('click', function(e) {
const now = Date.now();
if (e.target === lastTarget && (now - lastClickTime) < 500) { // 0.5 second threshold
clickCount++;
if (clickCount >= 3) {
window.dataLayer = window.dataLayer || [];
window.dataLayer.push({
event: 'rage_click_detected',
element: e.target.tagName,
element_classes: e.target.className
});
clickCount = 0; // reset
}
} else {
clickCount = 1;
lastTarget = e.target;
}
lastClickTime = now;
});
})();
</script>
(Detects 3 rapid clicks on the same element)
β
βWhy track it?
Users click on elements that look clickable but do nothing, causing frustration.
βHow to track it in GTM:
βCreate a Click Trigger that fires when a user clicks an element without a URL or action.
Example condition: Click URL is empty or missing.
Fire a GA4 Event: Event name like dead_click_detected
, with element details passed as parameters.
βPro Tip:
Design clarity fixes dead clicks fast β either remove the affordance or make it actionable.
<script>
// Dead click detection
document.addEventListener('click', function(e) {
if (!e.target.href && !e.target.onclick) {
window.dataLayer = window.dataLayer || [];
window.dataLayer.push({
event: 'dead_click_detected',
element: e.target.tagName,
element_classes: e.target.className
});
}
});
</script>
(Detects clicks on elements that don't have links or click handlers)
β
Why track it?
Landing on unavailable products kills buying intent and annoys users.
βHow to track it in GTM:
βUse a DOM Element variable or scrape the out-of-stock message from the page.Create a Trigger:
Fire when the "Out of Stock" label/text is present.
Fire a GA4 Event: Send an event like out_of_stock_viewed
with product details attached.
βPro Tip:
Prioritise restocking or hiding high-traffic out-of-stock items.
<script>
// Out-of-stock product detection
(function() {
const checkOutOfStock = function() {
const outOfStockElement = document.querySelector('.out-of-stock, .sold-out, [data-stock="out"]'); // tweak selectors for your site
if (outOfStockElement) {
window.dataLayer = window.dataLayer || [];
window.dataLayer.push({
event: 'out_of_stock_viewed',
product_name: document.querySelector('h1') ? document.querySelector('h1').innerText : ''
});
}
};
window.addEventListener('load', checkOutOfStock);
})();
</script>
(Detects if any 'Out of Stock' message appears. Adjust the selector if your site uses a specific class or attribute)
β
Why track it?
Pages that load slowly (especially mobile) destroy conversion rates.
How to track it in GTM:
Use the page_load_time
from built-in browser timings.
Set a Trigger: Fire if page load exceeds a threshold (e.g., 3 seconds).
Fire a GA4 Event: Name it slow_page_load_detected
and pass the load time.
Pro Tip:
Identify high-value pages with slow loads (e.g., checkout, signup) first.
<script>
// Slow page load detection
window.addEventListener('load', function() {
const loadTime = window.performance.timing.loadEventEnd - window.performance.timing.navigationStart;
if (loadTime > 3000) { // 3000ms = 3 seconds
window.dataLayer = window.dataLayer || [];
window.dataLayer.push({
event: 'slow_page_load_detected',
load_time_ms: loadTime,
page_path: window.location.pathname
});
}
});
<script>
(Fires if load time > 3 seconds. You can adjust the threshold)
β
You donβt need to track everything β but even adding just two or three of these can reveal huge hidden conversion blockers.
β
If you want help setting up these tags or running a deeper tracking audit,