Drupal is a registered trademark of Dries Buytaert
Protected Pages 3.0.0 Major update available for module protected_pages (3.0.0). Commerce Core 3.3.8 Minor update available for module commerce (3.3.8). Search API HTML Element Filter 1.0.7 Minor update available for module search_api_html_element_filter (1.0.7). Layout Builder Reorder 2.0.1 Minor update available for module layout_builder_reorder (2.0.1). Ban 1.1.0 Minor update available for module ban (1.1.0). Field Formatter Range 2.0.0 Major update available for module field_formatter_range (2.0.0). Field Formatter Range 8.x-1.8 Minor update available for module field_formatter_range (8.x-1.8). UI Patterns (SDC in Drupal UI) 2.0.18 Minor update available for module ui_patterns (2.0.18). Search API Solr 4.3.11 Module search_api_solr updated after 14 months of inactivity (4.3.11). Provus Mega Menu Module provus_mega_menu crossed 1,000 active installs.

This module adds a small, configurable delay to client-side redirects (like clicking external links or downloading files) to ensure that analytics events are fully recorded before the user navigates away. This helps prevent lost tracking data and improves the accuracy of your website analytics.

GA Redirect Delay (GARD) provides an optional client-side delay before navigating away from the site, ensuring that Google Analytics (GA4) or Google Tag Manager (GTM) events are reliably recorded.

When users click external links or download files (e.g. PDFs), browsers may redirect immediately, preventing analytics events from being fully transmitted. This can result in lost tracking data and inaccurate reporting.

GARD introduces a configurable browser-based delay after link clicks, allowing tracking events to fire before navigation proceeds. The implementation is entirely client-side and does not introduce any server-side delays.

Features

  • Enable or disable redirect delay globally
  • Configurable delay duration (milliseconds)
  • Apply to:
    • External links
    • File downloads (based on extension)
  • Custom analytics event name
  • Compatible with GA4 and GTM (dataLayer-based tracking)
  • No impact on server performance or SEO

Technical Approach

The module attaches a lightweight JavaScript behavior that:

  1. Intercepts qualifying link clicks.
  2. Pushes a configurable event to dataLayer.
  3. Waits for the configured delay.
  4. Proceeds with navigation.

Because the delay occurs after user interaction and not at the server level, there is no impact on Time To First Byte (TTFB) or search engine indexing.

Use Cases

  • Outbound link tracking
  • PDF download tracking
  • Review platform links
  • Affiliate or campaign links

Requirements

  • Drupal 10 or 11
  • Google Analytics or GTM configured separately

Activity

Total releases
1
First release
Feb 2026
Latest release
4 months ago
Releases (12 mo)
1 ▲ from 0
Maintenance
Active

Releases

Version Type Release date
1.x-dev Dev Feb 18, 2026