Roych Posted April 10 Posted April 10 (edited) Hi everyone, I’ve uploaded an updated version of the module. It is now called NativeAnalytics. This should be treated as a new module release, not just a small update of the earlier test versions. Important: If you previously tested PW Native Analytics, please uninstall the old module first and then install NativeAnalytics as a fresh install. I did not add a migration path from the old module to the new one, because the module name and structure changed during development. A clean install is the safer option. The main idea behind NativeAnalytics is simple: to provide a useful analytics dashboard directly inside ProcessWire, without relying on external analytics platforms, third-party scripts, or external APIs. Everything is handled natively inside the CMS, which makes it a good fit for projects where you want a simpler, self-contained analytics solution. The module currently tracks and displays things like: page views unique visitors sessions current visitors top pages referrers devices and browsers 404 hits engagement events such as form submits, downloads, tel/mail clicks, outbound clicks, and custom CTA events It also includes: charts and trend views comparison between periods custom date range filtering page-level analytics inside the page edit screen exports to CSV, PDF, and DOCX helper examples and a small snippet generator for custom event tracking ! In this latest version I also added several privacy and usability improvements: optional cookie-less visitor/session mode improved consent-based tracking helper functions for custom consent integrations optional PrivacyWire localStorage consent helper support cleaner behaviour when global tracking is disabled improved admin theme compatibility and spacing polished dashboard layout and panel alignment added a shortcut button to the module settings from the analytics dashboard The reason I built this module was that I wanted something that feels natural inside ProcessWire itself, instead of just embedding another analytics service into the admin. For many sites, it can be useful to have core traffic and engagement data available right where content is managed, with no need for external integrations. Multi-site analytics is not included yet, but it is something I am looking into. It would need proper per-site separation in the stored analytics data, so I want to approach that carefully rather than adding a quick workaround. (Also I don't have any multisite testing environment atm ...) Download it Here: NativeAnalytics_1_0_19.zip Enjoy! Edited 10 hours ago by Roych New Update v1.0.19 20 1
szabesz Posted April 11 Posted April 11 On 4/10/2026 at 7:53 PM, Roych said: Download it Here: PwNativeAnalytics.zip Thank you for sharing! Are you planning to add it to the Module Directory? 1
Roych Posted April 12 Author Posted April 12 Small update on PW Native Analytics I made a few refinements to improve usability and setup: cleaned up and improved the module settings added short text descriptions to make technical options easier to understand improved the date format setting so it now offers cleaner and more useful format choices made important beginner-friendly options enabled by default on install, such as: Enable tracking Enable event tracking Respect Do Not Track Ignore query strings in stored paths This makes the module easier to understand and ready to use immediately after installation, especially for less technical users. thx to matjazp for feedback 😉 I updated the file in first post! Cheers 4
Roych Posted April 14 Author Posted April 14 On 4/11/2026 at 9:42 PM, szabesz said: Thank you for sharing! Are you planning to add it to the Module Directory? I wasn't realy planning to, we'll see! R 2
MrSnoozles Posted April 23 Posted April 23 Very cool. How difficult do you think it would be to make it multi-site compatible? So that when the structure is like this: /root /website 1 /website 2 /website 3 Each website could get its own analytics. Would it be a major refactor or do you see it easily doable? @Roych
Stefanowitsch Posted April 27 Posted April 27 @Roych thanks! This is a really nice and clean module that integrates straight into the backend. I just installed it on a client site and its already filling with interesting data. @ai_slop I was able to make this module work together with PrivacyWire since I am inside the EU. If consent is chosen the cookie is set and the module activates. 4
Mikel Posted Sunday at 05:20 PM Posted Sunday at 05:20 PM On 4/27/2026 at 8:58 AM, Stefanowitsch said: I was able to make this module work together with PrivacyWire since I am inside the EU. If consent is chosen the cookie is set and the module activates. Hi, @Stefanowitsch, I´m curious: Do you hook into a PrivacyWire method or do you use its built in custom function trigger? We simply have set up a script that checks the local storage for the privacywire key. Then a cookie for Native Analytics is set or unset depending on its "statistics" value. Cheers, Mike
Stefanowitsch Posted yesterday at 07:31 AM Posted yesterday at 07:31 AM Hi @Mikel I use a custom JavaScript function (that name is entered in the PrivacyWire module settings) to check for consent and then set the cookie for activating NativeAnalytics: function initNativeAnalytics() { const consent = JSON.parse(localStorage.getItem('privacywire')); //console.log(consent); if (consent && (consent.cookieGroups.statistics || consent.cookieGroups.marketing)) { document.cookie = "pwna_consent=1; path=/; max-age=" + (60*60*24*365) + "; SameSite=Lax"; if (window.PWNA && typeof window.PWNA.trackIfConsented === 'function') { window.PWNA.trackIfConsented(); } } else { document.cookie = "pwna_consent=; path=/; expires=Thu, 01 Jan 1970 00:00:00 GMT"; } } 1
Roych Posted 10 hours ago Author Posted 10 hours ago NativeAnalytics v1.0.19 – update This release mainly focuses on privacy/consent handling and admin UI polishing. Added / improved: Added optional cookie-less visitor/session mode for sites that want to avoid browser visitor/session cookies. Added PrivacyWire localStorage consent helper support. Added helper methods for custom consent integrations: window.PWNA.trackIfConsented() window.PWNA.setConsent() window.PWNA.clearConsent() window.PWNA.syncPrivacyWireConsent() Improved consent-based tracking flow, so tracking can start correctly after consent is granted. Tracking-related settings are now hidden/disabled when global tracking is turned off, to avoid confusing combinations like “tracking off + event tracking on”. Added a module settings shortcut button in the analytics dashboard header. Improved AdminTheme compatibility and tab spacing across ProcessWire admin themes. Polished the flat admin UI and removed rounded corners. Fixed panel alignment issues in dashboard grid layouts, especially where side-by-side panels appeared vertically offset. Note: Multi-site analytics is not included yet. It is planned as a possible future improvement because it needs proper per-site separation in stored analytics data. Download is updated in first post! 3 2
Mikel Posted 5 hours ago Posted 5 hours ago Thank you very much for adressing this, @Roych! Would it be possible that you release the module either here in the Modules Section and/or on Github? Either way it would simplify the upgrade process of your wonderful module to a one-click action (ProcessUpgrades) or fully automatic (GitSync). Cheers, Mike
Roych Posted 4 hours ago Author Posted 4 hours ago 1 hour ago, Mikel said: Thank you very much for adressing this, @Roych! Would it be possible that you release the module either here in the Modules Section and/or on Github? Either way it would simplify the upgrade process of your wonderful module to a one-click action (ProcessUpgrades) or fully automatic (GitSync). Cheers, Mike I just did, but still waiting for approval. Cheers R 1
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now