-
Posts
405 -
Joined
-
Last visited
-
Days Won
3
Everything posted by Roych
-
module Native Analytics — a native analytics module for ProcessWire
Roych replied to Roych's topic in Module/Plugin Development
NativeAnalytics 1.0.29 is out This release polishes the recent contributions from @adrian and fixes a few edge cases: Hourly trend chart now live-updates the current hour (previously it could update the last slot of the day). "Find page" autocomplete now suggests only real pages with recorded data — bot rows and 404 probes are excluded. Page search no longer fails on environments without mbstring. Uninstalling only the dashboard module is now non-destructive — it won't remove the main module or drop your analytics tables. Full data removal still happens when you uninstall the main NativeAnalytics module. And anwser to @millipedia No step missing on your side — this was a bug. The tracking endpoint (/pwna-track/) was being recorded as the pageview path on some setups (subdir/proxy/trailing-slash), so every session showed it. Fixed in 1.0.29 release: the endpoint paths are now hard-excluded from being stored. Thanks R -
module Native Analytics — a native analytics module for ProcessWire
Roych replied to Roych's topic in Module/Plugin Development
I’ve uploaded a new NativeAnalytics update from v1.0.25 to v1.0.26. Big thanks to @adrian for the PRs, testing, feedback and useful suggestions. What’s new / improved: Added improved 404 bot/probe detection with the new scanner_404 rule. Added an option to show/hide bot traffic in the 404 report. Fixed dashboard tabs so the ?tab= URL parameter updates correctly. Current visitors are now grouped by visitor instead of showing duplicate sessions. Current visitors counters and tables are now more consistent. Removed duplicate/native SVG chart tooltips. Fixed chart/date labels so they no longer show unnecessary 00:00:00. Added new Avg active time / session metric. Added active time tracking with cookieless tracking support. Improved session quality reporting. Added new export options and improved export handling. Reworked the export button/dropdown for a cleaner admin UI. Improved Current Visitors auto-refresh so action buttons are not removed. Cleaned up export dropdown IDs and admin UI behavior. Improved install/schema consistency. Improved module info and permission definitions. Small UI, stability and code cleanup fixes. This update should make NativeAnalytics cleaner, more accurate and more consistent, especially around bots, 404 traffic, current visitors, exports and reporting. Cheers R -
module Native Analytics — a native analytics module for ProcessWire
Roych replied to Roych's topic in Module/Plugin Development
Thanks - all sorted in 1.0.25. @adrian — merged your PR. The preg_match regex fix and the new behavioral bot filter are both in. Great approach catching the headless scrapers that slip past UA detection. Appreciate the clean diagnosis and patch. 😉 On the follow-ups: The page edit stats widget now only renders on viewable pages ($page->viewable()), so non-viewable pages like Page Reference sources no longer show it. The global disable option still works on top of that. UserActivity conflict fixed on my side - NativeAnalytics no longer emits a <title> per data point on the SVG charts, so it can't blow past the request-line limit anymore. Your diagnosis was spot on though; the real fix belongs in UserActivity (document.title instead of jQuery('title').text()) — worth getting that one-liner to Ryan. Cheers R -
module Native Analytics — a native analytics module for ProcessWire
Roych replied to Roych's topic in Module/Plugin Development
NativeAnalytics 1.0.24 is out Major update focused on getting rid of bot noise that was inflating stats and skewing single-page rates. What's new: Bundled matomo/device-detector — thousands of bot signatures, smart TV / mobile / console detection. No Composer required, but a site-wide Composer install is auto-detected and preferred. JavaScript-first tracking mode (new default for fresh installs) — server-side recording disabled by default, JS tracker is the source of truth. Cuts bot traffic by 60–80% because bots don't execute JS. Existing installs keep the legacy "Both" mode on upgrade — switch in module settings when ready. Stronger 404 / scanner filtering — IP-rate-limited 404 scanners, unidentifiable user-agents on 404s, and paths that resolve via PagePathHistory redirects are now filtered out of all three entry points (server-side, JS pageview, JS event). HTTP libraries treated as bots — curl, wget, python-requests, GuzzleHttp, RSS readers etc. are now correctly filtered. Expanded regex fallback with 2025/2026 AI scrapers (GPTBot, ClaudeBot, PerplexityBot, ByteSpider, Meta-ExternalAgent and ~25 more). GitHub-based update check for the bundled device-detector — settings page shows when a newer release is available with manual update instructions (24h cached, no auto-downloads for safety). Module settings page reorganized into 7 collapsible fieldsets with two-column layouts. Upgrade is safe — your tracking mode stays at "Both" unless you change it. After upgrade I recommend switching to "JavaScript first" in module settings and watching the difference. A note on the bundled matomo/device-detector — the version shipped with this module (6.4.2) is intentionally a bit behind the latest release. Bundled libraries are meant as a fallback to keep the module self-contained; pinning a known-tested version avoids surprises when matomo introduces new detection rules or minor API changes between releases. The module checks GitHub for newer matomo releases in the background and shows an "Update available" notice in the settings when one is out. If you want the latest detection rules, the recommended path is to install matomo/device-detector site-wide via Composer (composer require matomo/device-detector) — the module will automatically prefer the Composer copy over the bundled one. Alternatively, you can replace the contents of /site/modules/NativeAnalytics/lib/matomo-device-detector/ with a newer release from the matomo GitHub page (instructions are in the module settings under the version notice). The release has been tested, but with this many changes some edge cases may still slip through. If you notice anything off, please let me know so we can fix it. 😉 Cheers R -
module Native Analytics — a native analytics module for ProcessWire
Roych replied to Roych's topic in Module/Plugin Development
just a small update about the next NativeAnalytics version, v1.0.24. A lot has already been done, but I’m still testing and polishing everything before I publish the full release. One of the main things I’ve been working on is better bot and crawler filtering. NativeAnalytics should now do a much better job at filtering out AI crawlers, SEO bots, social preview bots, uptime monitors, common HTTP libraries and other automated requests, so the analytics data should be cleaner. I also added support for the Matomo device-detector library. Thanks to @adrian The module can use a site-wide Composer installation if available, or fall back to the bundled version included with the module. There is now also a clearer status section in the module settings, so it is easier to see what detection method is currently being used. 404 handling has also been improved. The module now tries to avoid logging false 404s when the URL can actually be resolved by modules such as PagePathHistory, ProcessRedirects or Jumplinks. There are also two new cleanup buttons: Cleanup resolvable 404s Cleanup suspicious probes Suspicious probes are now detected better as well. This includes common scanner URLs like WordPress/Joomla/Drupal/Magento/admin login probes, .env, .git, config files, shell upload attempts, path traversal attempts and similar noise. I also added an optional URL/path filter, so if someone wants to exclude some custom patterns from tracking, this can now be done directly from the module settings. The module settings page has also been cleaned up and reorganized. It should now be much easier to understand, with clearer sections for tracking, filters, bot detection, privacy/consent, retention, reports and advanced settings. There are also several smaller improvements around realtime visitors, IP blocking, cleanup tools, bundled library fallback handling and general admin/dashboard styling. This is not the final release post yet, but the next upgrade is getting close and should be available soon. -
module Native Analytics — a native analytics module for ProcessWire
Roych replied to Roych's topic in Module/Plugin Development
There is already a setting for this in the "module settings" to disable this on every page. 😉 Already working on this, and will probably post an update later today. Working on: Aggressive bot detection: IP blocklist, 404 filter and some other updates.. 😉 R -
module Native Analytics — a native analytics module for ProcessWire
Roych replied to Roych's topic in Module/Plugin Development
NativeAnalytics v1.0.23 released Finaly! This release brings full theme-adaptive UI support - the dashboard now natively follows the active ProcessWire admin theme, including automatic light/dark mode switching via Konkat's CSS custom properties. What's new: Automatic light/dark mode - panels, tables, charts, filters, tooltips and sub-tabs all adapt to the active color scheme and more ... Grab it from the repo and let me know how it looks on your setups! Thanks to @matjazp for the nudge to make this dark-mode friendly - more and more people are using dark themes these days, so it really had to be done. Took longer than I thought it would ... Cheers R -
module Native Analytics — a native analytics module for ProcessWire
Roych replied to Roych's topic in Module/Plugin Development
Hi @adrian, thanks for the kind words! Good news — NativeAnalytics v1.0.22 now supports CSP nonces using exactly the two approaches you describe: Central $config->cspNonce / $config->cspNonce() — if/when Ryan adds it (or you define it yourself in config.php or via a hook), the module picks it up automatically. TracyDebugger-style header parsing — as a fallback, the module reads the already-sent Content-Security-Policy / CSP-Report-Only header and extracts the nonce from script-src / script-src-elem using essentially the same regex you posted. The relevant helper is NativeAnalytics::getCspNonce() / getScriptNonceAttribute(). The module does not create or manage the CSP header itself — it only reuses an existing nonce — so it works with whatever CSP setup you already have (middleware, web server config, custom hook, etc.). If no nonce is found, scripts are emitted normally without the attribute, so nothing breaks for sites that don't use CSP. - See NativeAnalytics.module.php, lines 143–191 if you want to check the implementation. So no core hacks needed on your end — should just work. Let me know if you run into any edge case. Version Updated to: v1.0.22 Cheers 😉 R -
module Native Analytics — a native analytics module for ProcessWire
Roych replied to Roych's topic in Module/Plugin Development
Thanks for the feedback. Yes, easy event tracking is already built into NativeAnalytics. The module can automatically track common engagement actions such as form submits, downloads, mailto/tel clicks and outbound links. For custom CTA buttons or other actions you can add simple data attributes like data-pwna-event, data-pwna-group and data-pwna-label. Based on the feedback, I have also added a new Goals section for the next release (This was already on the list and partialy done, thanks for the kick ... 😉 ). Goals can be created from tracked events or from page/path rules, for example a thank-you page, a form submit, a CTA click or a download. The dashboard then shows conversions, converted sessions, unique visitors and conversion rates. Regarding very large datasets, I do not want to overclaim without real long-term benchmarks at that scale. The module includes retention options, daily aggregate tables and cleanup tools, and the next release improves this further for events and goals. For very high-traffic sites, the recommended approach is to keep raw data only for a limited period and use aggregate data for long-term reporting. Wait for the update refresh 😉 New version is now v1.0.21. Thank you R -
module Native Analytics — a native analytics module for ProcessWire
Roych replied to Roych's topic in Module/Plugin Development
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 -
module Native Analytics — a native analytics module for ProcessWire
Roych replied to Roych's topic in Module/Plugin Development
I just did, but still waiting for approval. Cheers R -
module Native Analytics — a native analytics module for ProcessWire
Roych replied to Roych's topic in Module/Plugin Development
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! -
module Native Analytics — a native analytics module for ProcessWire
Roych replied to Roych's topic in Module/Plugin Development
I wasn't realy planning to, we'll see! R -
module Native Analytics — a native analytics module for ProcessWire
Roych replied to Roych's topic in Module/Plugin Development
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 -
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 New in the latest version: Goals and conversion tracking event-based goals, for example form submits, CTA clicks, downloads or tel/mail clicks page/path-based goals, for example thank-you pages or booking confirmation pages conversion rate reporting based on sessions and unique visitors a dedicated Goals dashboard with goal cards, goal trends and goal overview easier goal setup with helper text, quick presets and suggestions from already tracked events and pages daily aggregate tables for events and goals raw event retention setting additional database indexes and cleanup helpers for larger datasets 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, engagement and conversion data available right where content is managed. Goal tracking was added because several users asked for a simple way to measure important actions without having to fight with external analytics tools. For example, you can now create a goal for a contact form submit, a CTA button click, a file download or a visit to a thank-you page, and then see conversions and conversion rates directly in the ProcessWire admin. A small note about very large datasets: NativeAnalytics includes retention settings, daily aggregate tables and cleanup tools, and the latest version improves this further for events and goals. For very high-traffic sites, I still recommend using sensible raw data retention and keeping long-term reporting based on aggregated data. I do not want to overclaim without real long-term benchmarks on extremely large datasets, so feedback from larger installations is very welcome. ! 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. Get it here: https://processwire.com/modules/native-analytics/ Enjoy! If you find NativeAnalytics useful and would like to support further development, maintenance and testing, a small donation is always appreciated. The module will remain free, but support helps me spend more time improving it and adding new features. DONATE
- 34 replies
-
- 27
-
-
-
I made a small module called ProcessSiteSettings and thought I’d share it here in case it’s useful to someone. ProcessSiteSettings is a lightweight ProcessWire module for storing and editing global site values in one place. There are already similar modules available, so this is simply another free option with a focus on quick setup, usability, and helpful template snippets. It adds a Settings item to the ProcessWire admin menu and creates one central page for global site values like: copyright text footer content contact info social links SEO / AI summary text images repeaters Repeater Matrix page references other regular PW fields Ofc. add your own fields of choice to it, or delete the ones you don't need! It uses a normal template + page approach instead of a fake config form, so it works much more naturally with ProcessWire fields. It also includes a small helper box on the settings edit screen that shows ready-to-use template snippets for each field. It tries to generate smarter examples depending on the field type, including more complex fields like images, repeaters, matrix items, multi-value fields, etc. Settings Menu: Editing Values, adding/deleting custom fields and shortcut to Fields for quick creation of new ones. Quick helper for showing everything on frontend! Example usage on templates: <?= siteSettings('ss_copyright_text'); ?> <?= siteSettings()->ss_footer_text; ?> <?= $siteSettings->ss_contact_email; ?> The admin is in English and the module is translation-ready. Just install the module, and that's it! Just sharing it here in case someone finds it useful. Download Here: ProcessSiteSettings.zip
-
- 11
-
-
-
I've just made some update on the module. I added some usefull settings to the module, so you can now select row and seat order (left or right or Up or Down) I also added the seat design option. To view seats as square or as simple actual css seat. And you can now change the Labels for Row and Stage For displying seats on frontend, use: <?php $seatingModule = wire('modules')->get('TheaterSeating'); echo $seatingModule->renderFrontendSeatingChart($page); ?> If you don't see the css seat icon on frontend add this JS to your template. <script> document.addEventListener("DOMContentLoaded", function() { document.querySelectorAll(".seat").forEach(seat => { if (!seat.querySelector('.left-armrest')) { const leftArmrest = document.createElement('div'); leftArmrest.classList.add('left-armrest'); seat.appendChild(leftArmrest); } if (!seat.querySelector('.right-armrest')) { const rightArmrest = document.createElement('div'); rightArmrest.classList.add('right-armrest'); seat.appendChild(rightArmrest); } }); }); </script> Hope you like it 😉 R Download here: TheaterSeating.zip
-
module New module (PageAutomation (Copy, hide, delete, publish, unpublish, ...))
Roych replied to Roych's topic in Modules/Plugins
Yes, you are right, at the moment it only works with one action as I only needed it to work with datetime field but the overall idea was to add multiple actions. Maybe someday ... -
Not sure what you mean by PR? I just posted by replying.
-
Hey, I had the same problem, and I think I found the bug it is working for me. I added the fix that is working for me here. I'm in PHP8.3 and it works. here is the fixed module: ProcessMenuBuilder.zip cheers R
-
Hello, Because I was in need of such a thing but there was nothing that I could find, I had to create my own. I'm sharing here, so maybe someone will find it useful. My second module, Use at your own risk, there may be some mistakes, please if you find them, let me know! Right now the module mostly works with datetime field!!! This was what I was going for actualy. Description Page Automation Module for ProcessWire Description: The Page Automation module automates various page management tasks in ProcessWire, such as copying, cloning, deleting, publishing, hiding, and more based on predefined conditions. It allows users to set triggers based on a page's field values and perform automated actions without manual intervention. The module integrates with LazyCron for scheduling periodic checks. Key Features: Perform actions like copy, clone, delete, publish, hide/unhide automatically. Configure conditions based on date/time fields (e.g., "older than 1 day"). Schedule actions with flexible cron intervals (every minute, hour, day, week, or year). Supports applying actions only to pages using specific templates. Option to assign a different template to cloned/copied pages. Logs all automated actions for easy tracking. Requirements: ProcessWire 3.x or later. LazyCron Module (it won't work without it). Setup Instructions: Install the module through the ProcessWire admin Modules upload by File upload. Configure the conditions, templates, and actions via the module settings. (Optional) Install LazyCron for time-based automation. Verify that the automation_processed checkbox field is automatically created for tracking processed pages. Once configured, the module will automatically handle repetitive page management tasks based on your specified conditions, saving time and effort. Important! Uppon install the module will create a new field "automation_processed" which you must add to the main template (template for action or make it global), if not you'll end up with a bunch of copies. This field tells the module that the page was already proccessed, so it will leave it alone. PageAutomation_preview.mp4 I hope u like it 😉 You can download it here: PageAutomation.zip
- 3 replies
-
- 10
-
-
-
Hello, I have created a simple module to preview theater seat reservations. This is my very first module, so be gentle as I'm not a coder. What is it about? The module creates 5 fields that must be added to the template of your choice. (e.g. event-post) In the template, you can then set the number of rows and the number of seats in each row. After save your preview is created. You can then book or cancel seats by clicking on the seats boxes or trash icon to cancel them. We have a small theater and sometimes we remove some seats, so I also added the option to remove them. Seat-booking.mp4 You can the render this on your frontend with: <?php // Assuming $page is the current page object $rows = $page->rows ?: 9; // Default to 9 rows if not set $seatsPerRow = $page->seats_per_row ?: 8; // Default to 8 seats per row if not set // Load the existing CSS for styling $cssFile = $this->wire()->config->urls->siteModules . 'TheaterSeating/styles.css'; echo '<link rel="stylesheet" href="' . $cssFile . '">'; // Start the seating chart output echo '<div class="theater-seating">'; // Loop through rows for ($i = $rows; $i > 0; $i--) { echo '<div class="row">'; // Start a new row echo '<div class="row-label">Vrsta ' . $i . '</div>'; // Row label // Loop through seats for ($j = 1; $j <= $seatsPerRow; $j++) { $seatId = "$i-$j"; $occupiedClass = in_array($seatId, explode(',', $page->booked_seats ?: '')) ? 'selected' : ''; $disabledClass = in_array($seatId, explode(',', $page->disabled_seats ?: '')) ? 'disabled' : ''; // Output the seat div echo '<div class="seat ' . $occupiedClass . ' ' . $disabledClass . '" data-seat-id="' . $seatId . '">'; // Add the cross overlay for disabled seats if ($disabledClass) { echo '<div class="cross">✖</div>'; // X overlay } echo '</div>'; // Close seat div } echo '</div>'; // Close row div } echo '<div class="stage">Oder</div>'; echo '</div>'; // Close theater seating div ?> and maybe style with: .seat { width: 50px; height: 50px; margin: 0 5px; /* Horizontal margin between seats */ background-color: #ccc; cursor: default; /* Change cursor to indicate no interaction */ display: flex; align-items: center; justify-content: center; position: relative; } .seat.occupied { background-color: #f00; /* Red for occupied seats */ } .seat.selected { background-color: #0f0; /* Green for selected (booked) seats */ } .seat.disabled { background-color: rgba(255, 0, 0, 0.5); /* Semi-transparent red for disabled seats */ } .cross { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: rgba(255, 0, 0, 0.5); /* Semi-transparent overlay */ display: flex; align-items: center; justify-content: center; font-size: 24px; color: white; } .row-label { font-size: 16px; margin-right: 10px; /* Space between the label and seats */ font-weight: 600; width: 100px; /* Set a fixed width to align labels */ } I hope someone will find it usefull. Fell free to make it better. 😉 You can download it here: TheaterSeating.zip Cheers 😉 Roych
- 3 replies
-
- 19
-
-
-
Is it possible to upgrade module to work with PHP 8.2 or 8.3 maybe? It only works on PHP 7.4 at least here ... Thank you R
-
Maybe something like this? $menuBuilder = $this->modules->get('MarkupMenuBuilder'); $menu = $this->pages->get($id); if ($menu->menu_items->count()) { $this->menuItems = $menuBuilder->getMenuItems($id); } else { // Handle the case where there are no menu items, for example: $this->menuItems = []; // or any other appropriate action } Haven't tested! This code (should) first checks if there are any menu items by using the count() method on the menu_items field. If there are menu items, it proceeds to fetch and assign them using the getMenuItems method from the MenuBuilder module. If there are no items, you can handle it as needed. In the example above, an empty array is assigned to $this->menuItems, but you can customize it to match your specific requirements. This approach allows you to use the MenuBuilder module to create menus with or without items, without triggering the error you mentioned. Cheers, R
-
Great, thank you for clarifying the problem. ? R