-
-
Notifications
You must be signed in to change notification settings - Fork 1
Analytics
Aegis includes a privacy-first analytics framework that supports multiple analytics providers. The system is designed to respect visitor privacy while giving site owners the insights they need.
| Provider | Type | Privacy Level | Availability |
|---|---|---|---|
| Google Analytics 4 (GA4) | Full analytics | Standard | Theme |
| Google Tag Manager (GTM) | Tag management | Depends on tags | Theme |
| Microsoft Clarity | Behavior analytics | Standard | Theme |
| Plausible | Privacy-focused | High | Theme |
| Fathom | Privacy-focused | High | Theme |
| Matomo | Self-hosted analytics | High (self-hosted) | Theme |
| Meta Pixel | Advertising | Standard | Pro only |
The Aegis analytics framework follows these principles:
- No tracking by default — Analytics are disabled until explicitly configured.
- Consent awareness — Integration with consent management for GDPR/CCPA compliance.
- Minimal data collection — Only necessary data points are tracked.
- No third-party cookies (where possible) — Privacy-focused providers do not use cookies.
- Conditional loading — Analytics scripts load only when consent is given (if consent mode is enabled).
Analytics settings are configured through the WordPress admin:
- Navigate to Appearance → Editor → Styles or the theme settings panel.
- Locate the analytics configuration section.
- Enter your tracking ID or measurement ID for the desired provider.
- Configure consent and loading options.
- Save your settings.
| Setting | Description |
|---|---|
| Measurement ID | Your GA4 measurement ID (G-XXXXXXXXXX). |
| Consent mode | Enable Google Consent Mode v2 integration. |
| Anonymize IP | Strip the last octet of visitor IP addresses. |
| Setting | Description |
|---|---|
| Container ID | Your GTM container ID (GTM-XXXXXXX). |
| Data layer | Custom data layer events pushed by the theme. |
| Setting | Description |
|---|---|
| Project ID | Your Clarity project identifier. |
| Setting | Description |
|---|---|
| Domain | Your site domain registered in Plausible. |
| Self-hosted URL | Custom domain if self-hosting Plausible. |
| Setting | Description |
|---|---|
| Site ID | Your Fathom site identifier. |
| Custom domain | Your custom Fathom tracking domain (optional). |
| Setting | Description |
|---|---|
| URL | Your Matomo instance URL. |
| Site ID | Your site ID within Matomo. |
| Setting | Description |
|---|---|
| Pixel ID | Your Meta (Facebook) pixel identifier. |
| Events | Configurable conversion events. |
Note: Meta Pixel integration is available only in Aegis Pro.
For sites requiring cookie consent (GDPR, CCPA, and similar regulations):
- Analytics scripts are not loaded on initial page load.
- The theme checks for consent status via a standardized consent API.
- When consent is granted, analytics scripts are dynamically loaded.
- When consent is denied or withdrawn, no tracking occurs.
When Google Analytics or GTM is configured with consent mode:
- Default consent state is set to "denied" for analytics and advertising.
- When the visitor grants consent, the state updates to "granted."
- GA4 operates in cookieless mode when consent is denied (behavioral modeling only).
The consent system works with standard consent management plugins that set consent cookies or use the WordPress consent API.
Analytics scripts are loaded with performance in mind:
- Scripts use
asyncordeferattributes to avoid blocking page rendering. - Scripts load after the main content is rendered.
- Privacy-focused providers (Plausible, Fathom) use lightweight scripts (under 1 KB).
- No analytics scripts load if no provider is configured.
See performance for the overall theme performance strategy.
When WooCommerce is active, the analytics framework can track e-commerce events:
| Event | Trigger |
|---|---|
view_item |
Product page viewed |
add_to_cart |
Item added to cart |
begin_checkout |
Checkout started |
purchase |
Order completed |
view_item_list |
Product list viewed |
These events are pushed to GA4 and GTM automatically when configured.
By default, analytics can be configured to exclude tracking for logged-in administrators and editors, ensuring internal traffic does not skew data.
You can enable multiple analytics providers simultaneously. For example:
- Plausible for privacy-friendly visitor stats.
- Google Tag Manager for marketing and advertising tags.
- Clarity for session recordings and heatmaps.
Each provider loads independently and does not conflict with others.
After configuration, verify that analytics are working:
- Open your site in an incognito/private browser window.
- Open browser developer tools (F12) and switch to the Network tab.
- Look for requests to your analytics provider domain.
- Check the real-time reports in your analytics dashboard.
- performance — Learn about the conditional loading strategy.
- accessibility — Privacy and accessibility considerations.
- plugin-integrations — Other supported plugins.
Aegis version 1.0.0 | GitHub Repository | Report an Issue | Atmostfear Entertainment
License: GPL-2.0-or-later