Jump to content

Recommended Posts

Posted (edited)

Hi everyone,

I’m happy to share NativeAnalytics, a native first-party analytics module for ProcessWire.

The module is now available in the ProcessWire modules directory:
https://processwire.com/modules/native-analytics/

NativeAnalytics provides a useful analytics dashboard directly inside the ProcessWire admin, without relying on external analytics platforms, third-party scripts or external APIs. All analytics data is stored locally in your ProcessWire installation, which makes it a good fit for projects where you want a simpler, more self-contained analytics solution.

The module currently tracks and displays:

  • 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
  • optional monthly email reports
  • optional PDF report attachments
  • exports to CSV, PDF and DOCX
  • helper examples and a small snippet generator for custom event tracking

There are also several privacy and consent-related options:

  • optional cookie-less visitor/session mode
  • consent-based tracking
  • helper functions for custom consent integrations
  • optional PrivacyWire localStorage consent helper support
  • cleaner behaviour when global tracking is disabled

The reason I built this module was that I wanted something that feels natural inside ProcessWire itself, instead of 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.

! If you tested one of the earlier development versions named PW Native Analytics, I recommend uninstalling that old test version first and installing NativeAnalytics as a fresh module, because the module name and structure changed during development.

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.

Feedback, bug reports and suggestions are very welcome.

PWAnalitycs-Update.thumb.jpg.7ac4d60e0f885f66ff173715defeac2e.jpg

Get it here:
https://processwire.com/modules/native-analytics/

Enjoy!
 

Edited by Roych
Updated the first post now that NativeAnalytics is available in the ProcessWire modules directory.
  • Like 21
  • Thanks 2
Posted

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

 

  • Like 4
  • Roych changed the title to PW Native Analytics 1.0.5 — a native analytics module for ProcessWire
Posted
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

  • Like 2
  • Roych changed the title to Native Analytics v1.0.8 Update — a native analytics module for ProcessWire
Posted

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

Posted

@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.

  • Like 4
  • 2 weeks later...
Posted
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

Posted

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";
    }
}
  • Thanks 1
  • Roych changed the title to Native Analytics v1.0.19 Update — a native analytics module for ProcessWire
Posted

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!

  • Like 3
  • Thanks 2
Posted

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

Posted
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

  • Like 1
  • Thanks 1
  • Roych changed the title to Native Analytics — a native analytics module for ProcessWire
Posted

I’ve just uploaded a new version of NativeAnalytics 1.0.20.

This update mainly focuses on monthly reporting, privacy options, engagement tracking improvements and some smaller admin UI refinements.

Added / improved

  • Added optional monthly email reports
  • Added Send test report now option in module settings
  • Added report preview before sending
  • Added optional PDF report attachment
  • Improved page-level analytics summary inside Page Edit
  • Added a setting to show/hide the Page Edit analytics summary
  • Improved spacing and styling of the Page Edit analytics block
  • Improved engagement event tracking, especially form submit tracking
  • Added better cache-busting for updated tracker/admin assets
  • Added module info files so the ProcessWire modules directory and Upgrade module can detect the version correctly
  • Added support links to the module info array

The module should now also be upgradeable through the ProcessWire Upgrade module once the modules directory has refreshed the latest version.

The current version is 1.0.20.

 

Special thanks to matjazp for testing the module and reporting useful issues along the way. The feedback helped a lot with polishing the module and making it more reliable in real-world use.

P

  • Like 2

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...