Smart Local Google Analytics
Introduction
GDPR-compliant cookie consent for Google Analytics 4 and Tag Manager on Joomla — blocks tracking until visitors agree, hosts Google's scripts on your own domain, and ships with themes, dark mode, and geo-detection.
Smart Local Google Analytics blocks GA4 and Google Tag Manager completely until your visitor consents. No cookies are set, no data reaches Google, and no scripts load until someone clicks Accept — and the decline button is just as prominent as the accept button.
It is entirely self-hosted. There is no third-party consent service in the middle, no external API calls, and no account to sign up for. It can even download Google's tracking JavaScript to your own server and serve it from your domain. Enter a Measurement ID and you are live — or leave the field empty and let Legacy Mode find and block the GA code your template already hard-codes, without editing a single file.
🎯 Use cases
- 🇪🇺 Sites tracking EU visitors — run GA4 or GTM under GDPR with consent collected before anything loads.
- 🏢 Agencies handing over sites — ship a compliant analytics setup that the client can restyle themselves, with no per-site SaaS fee.
- 🔁 Replacing a bloated CMP — drop a heavy third-party consent platform that ironically loads its own trackers.
- 🧩 Templates with hard-coded GA — Legacy Mode detects and blocks existing GA/GTM code without touching the template.
- 🌍 Global audiences — show the dialog only to EU, EEA and UK visitors, and auto-agree everywhere else.
- ⚡ Performance-sensitive sites — serve Google's script locally and cut a third-party connection from every page load.
💡 Benefits
- 🔒 Compliant by default — nothing loads before consent, so there is no window where a visitor is tracked without agreeing.
- 🏠 Nothing leaves your server — no external consent service, no IP geolocation, no third-party calls of any kind at runtime.
- ⚡ Faster pages — local script hosting removes a request to Google's CDN and serves the file from your own domain.
- 🎨 Looks like your site, not a plugin — five themes with dark variants, four positions, four animations, and a full colour picker.
- ♿ Usable by everyone — WCAG 2.1 AA: keyboard focus trap, ARIA dialog semantics, and reduced-motion support.
- 🔧 No code required — tracking ID, text, colours, cookie lifetime and regions are all configured from the Joomla admin.
- 🆓 Open source & upgrade-safe — GPL v2 licensed, delivered through Joomla's native update channel, with no deprecated APIs.
🧩 Features
🍪 Cookie Consent
Secure, GDPR-compliant consent collection out of the box.
- Accept & decline dialog — clear, honest choices with equally prominent buttons
- Configurable cookie lifetime — session-based, or a custom duration from 1 to 365 days
- Privacy policy link — select any Joomla menu item as your privacy policy page
- Secure cookies — HttpOnly, Secure and SameSite=Lax flags on every cookie
- CSRF protection — tamper-proof form submission with token validation
📊 Analytics Integration
Full support for Google Analytics 4 and Google Tag Manager.
- GA4 & GTM support — works with Measurement IDs (G-XXXXXXXXXX) and GTM containers (GTM-XXXXXXX)
- Consent-first injection — scripts load only after explicit visitor consent
- Legacy Mode — auto-detects existing GA/GTM code in your template and blocks it until consent
- Local script hosting — downloads the tracking JavaScript to your server for maximum privacy and speed
- Configurable refresh — set how often locally hosted scripts update, from 1 to 30 days
- One-click cache clear — purge cached scripts from the admin panel instantly
🎨 Design & Themes
Consent dialogs that match your brand instead of fighting it.
- 4 positions — centre modal, full-width bottom bar, bottom-right corner, or bottom-left corner
- 5 colour themes — Clean, Midnight, Forest, Slate and Warm, each with a dark mode variant
- Custom colours — a full colour picker for background, text and button colours individually
- 4 animations — fade in from the top, bottom, left or right
- Custom text — set your own headline, message and icon without editing language files
🌙 Dark Mode
Automatic or forced dark mode with full theme support.
- Auto detection — reads the OS/browser preference via prefers-color-scheme
- Force mode — override visitor preferences with always-light or always-dark
- Custom dark palette — define separate colours for dark mode when using the custom theme
🌍 Geo-Detection
Show consent dialogs only where regulations require them.
- Language-based detection — reads the browser Accept-Language header, with no third-party APIs
- EU, EEA & UK coverage — all 27 EU member states, EEA countries, and the UK and Ireland
- 3 non-EU behaviours — auto-agree, show the consent dialog, or skip the plugin entirely
- Region toggles — enable or disable the EU, EEA and UK consent regions independently
- Safe defaults — unknown visitors always see the consent dialog
♿ Accessibility
WCAG 2.1 AA compliant for every visitor.
- Keyboard navigation — a full focus trap inside the consent dialog
- Screen reader support — ARIA dialog role, aria-modal, and live regions
- Reduced motion — respects prefers-reduced-motion for animations
- Semantic HTML — proper heading hierarchy, form labels, and descriptive aria-labels
🛠️ Developer
Modern Joomla architecture with no deprecated APIs.
- Namespace-based plugin — SubscriberInterface event registration via getSubscribedEvents()
- Dependency injection — clean DI through services/provider.php
- WebAssetManager — all assets loaded via the joomla.asset.json registry
- Zero runtime dependencies — everything runs on your server, with no external calls
- Multilingual — en-GB and de-DE included; add any language with .ini files
- Joomla 4.x, 5.x & 6.x
🔗 Resources
📚Documentation - https://www.nextsoftware.dev/documentation/smart-local-google-analytics
📝Changelog - https://nextsoftware.dev/changelogs/smart-local-google-analytics
Smart Local Google Analytics
- Version:
- 6.0.1
- Developer:
- NextSoftware Team
- Last updated:
-
Jul 28 2026
1 day ago - Date added:
- Jul 25 2026
- License:
- GPLv2 or later
- Type:
- Paid download
- Includes:
- p
- Compatibility:
- J4 J5 J6
Share