Giter Site home page Giter Site logo

daandelange / kirby3-simplestats Goto Github PK

View Code? Open in Web Editor NEW
60.0 4.0 7.0 9.95 MB

All your data are belong to us. -- Track pageviews, referrers and devices on your Kirby 3 website.

License: MIT License

JavaScript 0.50% PHP 68.67% Vue 30.83%
kirby-plugin kirby3-plugin kirby3 analytics stats page-counter

kirby3-simplestats's Introduction

SimpleStats

Track page views, referrers and devices on your Kirby 3 website. This plugin provides a simple solution for self-hosted, minimal and non-intrusive visitor analytics.

Simplestats Screenshot

  • It tracks referrer URLs to keep track of who links to your website, categorised as either search, social or website.
  • It tracks device information (device types, browser engine, OS family; all version-less) for keeping track of how your website is visited.
  • It tracks page visits, counting 1 hit per page per unique user per language, every 24H.
  • The collected data is stored in a .sqlite database (raw data) which you could query for custom purposes. The Stats class also exposes most collected data.
  • A panel area visualises the data in charts.

How it works

  • Tracking happens when the page is served by Kirby.
  • A crypted user-unique fingerprint is stored in order to track unique page views. The formula is more or less sha1( base64_encode( mix( anonimize(IP, 0.0.0.x) + trunc(UserAgent) + Salt)) ). It's stored together with a list of visited pages, the device category (bot/mobile/desktop/tablet/other), the browser's engine (Gecko/Webkit/Blink/Other) and OS Family. This data is kept for a very short amount of time to ensure only counting unique hits.
  • After 24H, the collected data is processed and any user identifying data is deleted :
    • The visited pages' hit counts are incremented, globally and per language.
    • Device, Engine and OS Family are separately incremented.
  • Referrers are processed immediately and are not bound to any user-related identifier.
  • All data is summed up on a monthly basis by default. You can easily change this "timeframe" to weekly or even provide your own custom timeframe utility.

Current state

Consider this plugin beta. Any feedback or bug reports are welcome. It's been successfully running on multiple production websites for about a year. The tracking part is almost done, when the panel interface will be more polished, I'll consider a first release. Please note that the database structure might evolve over time, until a more stable release is available (for which you'll be able upgrade your old databases; the upgrade meccanism already works).

Contributing

I guess a lot of options could be added to suit the plugin for a wider variety of website setups. The panel interface could also be improved and translated. Any contributions (discussions, reports, feedback and pull requests) are welcome, as long as the collected stats stay minimal and reasonably non-intrusive. You may also have a look at the open issues.


Setup

Requirements

  • A recent Kirby installation (currently tested with 3.9+) and support for SQLite3.
  • There's an automatic requirements checker in the Information tab of the plugin's panel view.

Installation

  • Option 1 : Download Download and copy this repository to /site/plugins/simplestats.

  • Option 2 : Git submodule

git submodule add https://github.com/daandelange/kirby3-simplestats.git site/plugins/simplestats

Eventually add --depth 1 to discard the repo commit history. (saves disk space)

  • Option 3 : Composer (update the command to match the latest version)
    composer require daandelange/simplestats:~0.6.2-beta (update with composer update)
    Note: While SimpleStats is still alpha, there is no stable channel for composer, so you need to specify the unstable version.
    Note: I don't make a release for every small change. If you want to use the latest version with composer, you can manually enter a commit :
    composer require daandelange/simplestats:dev-master#dbdb4a2 --with-dependencies.

Configuration

Stats blueprint section

If you wish to display page stats in a section, you may add a pagestats panel section to your page's blueprint.

sections:
  pagestats:
    type: pagestats
    label: TestHeadline
    size: small
    showTotals: true
    showTimeline: true
    showLanguages: true
    showFullInfo: false

Language setup

Multi-language websites are supported. For each page, there's a global counter, with an optional counter for each language. Warning: Do not add or remove languages to your Kirby installation without resetting your database file ! Also, the panel view has not (yet?) been translated. Note: During the alpha phase, I'm working with a multi-language context. While I try to test single language setups from time to time, SimpleStats might break occasionally in these setups.

Database Configuration

The database file is a simple .sqlite file that holds all tracking data. You can view it from the dedicated panel area, or by including smaller widget sections in the panel page editor. The popular Sqlite format allows you to easily grab the data and visualise it your way, or import it in other software. It's recommended to occasionally backup your stats database file.

Tracking Resolution and Kirby Languages (Important !)

Please note that the database is tightly bound to the tracking resolution option (daandelange.simplestats.tracking.timeFrameUtility) and can not be changed afterwards. Changing the resolution while keeping the same database file results in unefined behaviour. The same goes for Kirby's Language setup: if you change your multilanguage settings, you need to create a new database file (however, manually editing the previous database file, you might be able to preserve your data). This could be automated with update scripts.

Generating Stats

If you'd like to populate the database with some fake stats (useful for testing or developing SimpleStats), you can use the panel interface to generate some in the "Information" tab.

Legal configuration

Depending on your local laws, you might need to sit down and define how personal visitor data is handled. You might want to inspect the source code to know what's going on in details. As the license states, there's no guarantee whatsoever.

Integrating to your page

If you want to use the default onLoad tracking method, no further action is required, the plugin automatically hooks to Kirby route events. If you choose any other tracking method, you'll need to integrate the method in your code.

Possible Tracking Methods: (Config value: tracking.method)

  • SimpleStatsTrackingMode::OnLoad : Uses kirby's route hooks to track content when it's served. Pros: Ensures that every request is tracked. Cons: Slows down the page serve time. Setup steps: None.
  • SimpleStatsTrackingMode::OnImage : Generate a simple image tag within your HTML. Pros: Doesn't slow down page serve time. Cons: You trust the user to load the image. Setup steps: You need to call $page->simpleStatsImage() in your template code. You probably want to do this once in site/snippets/footer.php for example.
  • SimpleStatsTrackingMode::Disabled : Disables tracking, no further action is needed. (now much tested yet) Setup steps: None.
  • SimpleStatsTrackingMode::Manual : Manually call the tracking function. Pros: Very flexible, might solve edge-case-usage. Setup steps: You have to call SimpleStats::track() manually. Additionally, you need to populate the http headers argument accrdingly to track referers and device information.

Options

Like any Kirby plugin, options can be set in your site/config/config.php. All available options are listed and explained in src/config/options.php.

Example :

// site/config/config.php

// The custom variable types (SimpleStatsTimeFrameUtility, SimplestatsTrackingMode) are namespaced, you can shorten their invocations with the line below:
// use daandelange\SimpleStats\SimpleStatsTrackingMode;

require_once(__DIR__ . '/../plugins/simplestats/src/models/SimpleStatsTimeFrameUtility.php');
return [
  // [...] your options ...

  // Simplestats
  'daandelange.simplestats.panel.enable' => false, // Disable the panel view completely
  'daandelange.simplestats.tracking.enableReferers' => false, // Disable referer tracking
  'daandelange.simplestats.tracking.timeFrameUtility' => new \daandelange\SimpleStats\SimpleStatsTimeFrameUtilityWeekly(), // Here you can put your custom inherited class from SimpleStatsTimeFrameUtility
  'daandelange.simplestats.tracking.timeFrameUtility' => 'weekly', // Alternative
  'daandelange.simplestats.tracking.method' => \daandelange\SimpleStats\SimpleStatsTrackingMode::OnImage,
];

Here's a list with options that have been tested. (the daandelange.simplestats part has been stripped) You might also find some more detailed information in the comments of options.php.

Option Type Default Description Comment
TRACKING
tracking.timeFrameUtility String | SimpleStatsTimeFrameUtility 'monthly' Set the class that handles time conversions to periods. (read note below!*) Possible string values: monthly, weekly.
tracking.enableReferers Bool true Enables tracking referrers. Gives an insight of who links to your website.
tracking.enableDevices Bool true Enables tracking of minimal hardware configurations (device information)
tracking.enableVisits Bool true Enables tracking page visits (frequentation)
tracking.enableVisitLanguages Bool true Enables a counter per language per page. Only effective in multi-language Kirby installations and enableVisits enabled.
tracking.ignore.roles Array ['admin'] Ignore any tracking for connected users with these roles.
tracking.ignore.pages Array [] Ignore tracking for these page ids. Make sure to use the full id, not the slug.
tracking.ignore.templates Array ['error'] Ignore tracking for pages with these templates. Checked against template() and intendedTemplate()
tracking.ignore.bots Bool false Ignore tracking any bots.
tracking.ignore.botVisits Bool true Ignore counting bot page views.
tracking.ignore.botReferers Bool true Ignore tracking referrers sent by bots.
tracking.salt String 'CHANGEME' A unique hash, used to generate a unique user id from visitor data. Recommended to change, ensures that user identifying information is hard to retrieve if your database leaks.
tracking.anonimizeIpBits Number 1 Anonymise the IP address of X bits. Use 0 for no anonymisation, 4 for full anonymisation.
tracking.method SimplestatsTrackingMode onLoad Tracking mode. See SimplestatsTrackingMode for more information. onLoad is the only fully automatic mode, others need manual attention.
PANEL
panel.dismissDisclaimer Bool false Dismisses the panel disclaimer message.
panel.enable Bool true Enable/Disable viewing stats in the panel.
panel.authorizedRoles Array ['admin'] User roles that are allowed to view statistics from the panel.
panel.breadcrumbLabel String 'SimpleStats' Breadcrumb shown in the panel.
panel.hideBots Bool false To hide bot information from the devices tab.
  • : Note - You have to choose the timeFrameUtility setting before the initialisation. If you'd like to change it afterwards, you'll not be able to import the previously collected data. Changing timeFrameUtility, you need to replace the database file with a new one (or manage to convert it).

Updating

Before updating, make sure to backup your database file. If something goes wrong, you'll be able to retrieve your stats by replacing the database file later.

Depending on the installation method you used, proceed to the logical steps to update.

After updating:

  • Review new options and configure as wished.
  • Sometimes, a database upgrade is needed. If so, head to the panel's Information tab and follow instructions in the upgrade section.
  • It's also a good idea to check the log file for any errors.

API

Singletons

  • SimpleStats::safeTrack($id) Throw-safe alternative of track(). $id is a $page->id() to be tracked.
  • SimpleStats::track($id) Function called to track user data. $id is a $page->id() to be tracked.

Page Methods

  • $page->simpleStatsImage() HTML code for the tracking image, when using OnImage tracking method.
  • $page->getPageStats() Returns an array with useful tracking information about the page.

User Methods

  • $user->hasSimpleStatsPanelAccess($forSpecialAdminAccess=false) Returns true if the user is authorized to access the SimpleStats Panel, with or without special admin rights.

Panel Interface

Charts

Charts are interactive, you can hover them to have details, and click labels to toggle filtering. You can even download timelines as PNGs.

Tables

Tables are interactive and paginated. You can search data within and sort them by clicking on the column headers.


Development

Development was started from a standard Kirby PluginKit, see their plugin guide for more details on using it. These steps are optional, for building development versions.

  • Npm requirements (optional) : npm install -g parcel-bundler
  • Setup : cd /path/to/website/site/plugins/simplestats && npm install
  • While developing : npm run dev
  • Compile a production build : npm run build
  • Update dependencies : npm update

Powered by

Alternatives / Similar

License

kirby3-simplestats's People

Contributors

che1ron avatar daandelange avatar doup avatar ersoma avatar j54j6 avatar medienbaecker avatar s1syphos avatar therephil avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

kirby3-simplestats's Issues

Data consistency protection

Currently, the config's tracking period must match the database's one.
Database files aren't exchangeable with different tracking period configurations.
Corruption cases: when the configuration suddenly changes or when databases are manually interchanged with a period config mismatch.

To protect the database data :

  • Prevent writing to it when the configuration's tracking period doesn't match the one from the db.
    Make it backup the old one and create a new one ? And enforce period name in db filename + db contents ?
    Also discussed in #22
  • Prevent overwriting existing incompatible db files by renaming them ?
  • Add an option to explicitly disable generating stats. ( see: daandelange.simplestats.tracking.method)
  • Protect the database when adding/removing Kirby languages and write an upgrade script so data can be kept.

Pimping the panel interface

The data presentation is very "functional" but it could look better.
Specially when data accumulates (over time, many pages, etc.), I guess the presentation gets worse.

Any suggestions / contributions / screenshots are welcome.

  • Allow viewing custom timespans. (Something like there used to be in Retour-for-kirby v2 ?)
  • Group page visits from child pages to better visualise traffic trough the site arborescence. (fold/unfold childs in table ? a graph?)
  • Add a blueprint field to display on panel pages for detailed page stats. (Also add a one-page detailed stats tab to the panel?)
  • Add "Editor" vs "Admin" permissions for the different panel views.
  • Download database from panel to make backups. (auto backups too?)
  • Generate fake stats (for testing) 42135f1
  • Compute average, total and unique visits/hits per language per period.
  • Show latest log messages in info section
  • Add a "current visitors" panel visualising entry pages, exit pages and navigation paths of currently tracked users ? (needs tracker logic change too)
  • #22 (still needs timespan name in database file ?)
  • #21
  • #16
  • #8
  • Better (more pleasant) chart colors and the possibility to change them via the plugin options.

.sqlite

Dear Daan,
i was very happy to read about your plugin in the last kirby kosmos issue and installed it right away.
Judging from the panel the plugin seems to work there, but there is no .sqlite file being created in the site folder (site/logs/simplestats.sqlite), in fact, no logs folder has been created and the panel view states: "Unable to open database: unable to open database file".
So there seems one part not working as expected.
Do i have to create the folder site/logs and the files there myself or is this automatically done by the plugin?
Is there a way to troubleshoot this?
I am running on kirby 3.4.0

Matthias

Correct database limit in queries

As a dummy protection, db queries are limited to 1000. (could cause issues on ancient databases, or websites with a lot of traffic.)
Figure something out to set/handle this correctly.

[Documentation] Composer installation according to docs fails

Right now, because SimpleStats does not have a 'stable' release tag, when we try to follow the simple installation instructions for composer, the installation fails - because the latest versions of composer assume by default that we always want to install the latest STABLE version of a package. If a package has NO stable version, then installation fails with a warning:

Screen Shot 2022-02-25 at 4 07 36 pm

In order to be able to install with composer, at the moment it's necessary to explicitly specify a 'beta' compatibility - e.g.:

composer require daandelange/simplestats:~0.4-beta

Page section blueprint : broken and js error thrown

Hi,

got simplestats up and running to some extend, but when I try to implement the statistics in one of my blueprints, it throws this error, when I enter that particular blueprint in the panel

Cannot read properties of undefined (reading 'length')

My Blueprint uses tabs and goes like this:

title: MySite


tabs:
  stats:
    label: Stats
    icon: globe
    sections:
      pagestats:
        type: pagestats
        label: TestHeadline
        size: small
        showTotals: true
        showTimeline: true
        showLanguages: true
        showFullInfo: true

  content:
    label: Content
    icon: text
    columns:
      - width: 1/3
        fields:
          titlebar:
            label: Website Title
            type: text
          line1:
            type: line

I also enabled the panel view in my config php like this:

require_once(__DIR__ . '/../plugins/simplestats/src/models/SimpleStatsTimeFrameUtility.php');
return [
  // [...] your options ...

  // Simplestats
  'daandelange.simplestats.panel.enable' => true, // Disable the panel view completely
  'daandelange.simplestats.tracking.enableReferers' => true, // Disable referer tracking
  'daandelange.simplestats.tracking.timeFrameUtility' => new \daandelange\SimpleStats\SimpleStatsTimeFrameUtilityWeekly(), // Here you can put your custom inherited class from SimpleStatsTimeFrameUtility
  'daandelange.simplestats.tracking.timeFrameUtility' => 'weekly', // Alternative
  'daandelange.simplestats.tracking.method' => \daandelange\SimpleStats\SimpleStatsTrackingMode::OnImage,
];

can somebody give me a hint on what's wrong there?

How to use/acess?

Hi Daandelange, I’m quite interested by your plugin, but I’m a real n00b!

I followed the Installation method (copy to /site/plugins/simplestats), but now I’m stuck. How do I access the plugin? Do I need to go to my Kirby panel?

Panel Interface Translations

Hello
I would like to help you for the French translation. Can you provide all entries that must be translated plz ?
Bye

Feature request: option to exclude bots

I really like this plugin but I am not so much interested in the bots data. Could you add an option in the panel or in the config to toggle bots data in the visualizations?

Clarify TimeFrame switching and notify on user mistakes

I started collecting data with the default monthly view and everything looked fine:
Site_Visits (1)
Then I wanted to switch weekly view instead to have a more detailed timeline but this messes up the visualization of the data:
Site_Visits
After switching back to monthly everything is back to normal so it seems that the data is stored correctly in the database but the logic to visualize it for the weekly option has an issue with it.

Feature request: Export function

An export function would be very useful to pass on (selected) statistics to clients or to archive them. For this purpose, it would be practical to define specific time periods for the export.

Processed and visually prepared data as in the panel would be excellent, for example in PDF format. In addition, CSV or Excel output of the raw data.

Feature request: customise breadcrumb label

It would be nice to have the possibility to edit or remove the breadcrump label via options.

The current output may not be suitable for every context:

SimpleStats - All your data are belong to us !

Empty SimpleStats page

Hey!

I just installed the plugin to a site I'm currently developing. The SimpleStats page shows up in the Panel, but it is completely empty:

panel_simplestats_1

An error appeared for the first time I opened the page, but not any more:

panel_simplestats_4

This may be normal as the site is not yet receiving traffic, but even the current sessions section is empty after I visited a few pages:

panel_simplestats_2

It's interesting to note how the date range selector defaults to 1999 and if I open the datepicker and press "Today" it doesn't change the date.

I tried to use the Tracking Tester feature to populate the DB with some data, but got the following error:

panel_simplestats_3

The .sqlite file is created successfully.
I'm running PHP 8.2.2 (tried 8.1 as well) and Kirby 3.9.1 on a Ubuntu 20.04.5 LTS server above Dokku 0.29.4.

Do you have any idea what can be the problem?
Thanks!

UI Conflict with Pagetable plugin

When using SimpleStats together with Pagetable plugin by sylvainjule (https://github.com/sylvainjule/kirby-pagetable), the UI of pagetable gets compromised in the panel.

Kirby 3.6.1.1 Plainkit with SimpleStats and Pagetable:

simplestat-active

Without SimpleStats:

simplestats-deactivated

My system

  • Device: MacBook Pro 2019
  • OS: MacOS Monterey 12.0.1
  • Browser: Opera 82, Firefox 95
  • Kirby 3.6.1.1
  • Pagetable Plugin 1.0.1

Tracking pixel : error 500 in mono language setups

Tried with starterkit v3.9.8 and v4.0.3

First I tried to set options like indicated in the docs:

// site/config/config.php

return [
   'debug' => true,
  'daandelange.simplestats.tracking.method' => \daandelange\SimpleStats\SimpleStatsTrackingMode::OnImage,
];

PHP promptly crashed...

I ended up changing the setting directly in src/config/options.php

Then I put <?= $page->simpleStatsImage() ?> right before the </body> tag, which generates the following:

<img alt="simplestats counter pixel" class="simplestats-image" height="1" loading="lazy" src="http://localhost:81/starterkit-4.0.3/notes/counter.png" style="position: absolute; right: 0; pointer-events: none; height: 1px; width: 1px; opacity: 0;" width="1">

The src URL is the page URL + /counter.png

However it fails to load and returns 500 error in the dev console, I'm assuming this is not the intended behavior and that tracking failed.

Software Tests

Writing tests could be very useful to have to ensure production readyness.
Specially on the timeframe utilities which can cause infinite loops if not working correctly.
Also the tracker code kirby integration could be tested.

I have no idea how, but Kirby itself and many plugins use tests, so it should be doable.

Add support for composer

Can you please add support for composer?
It is offered by nearly all plugins and makes updating them very easy.

[K4] Kirby 4 issues list

This issue lists all reported K4 issues, hoping to bring support for it.
(Please create a new issue to add one)

How to "enable" tracking^^

Hey,

I am not sure if my installation is the problem or I didn't understand the Documentation...

I want to track my blog sites and added the Page method "$page->simpleStatsImage()" to the header of my template so every time the page is called this code will be executed... But my tracking charts are all empty just the list on the information page is filled with 2 entries "Visitors (current session)"

The Setup checker doesn't give any warnings (see SC) - did I need to use the singeltons to? and what is the "OnImage" tracking method? - is there another documentation site for this plugin and I overread it?^^

This is my current Information Page:

information

And all other pages looks like this (from the avail. data perspektive ^^)
allother

This is my header code (snippet):

<body data-bs-theme="light">
    <header>
      <?php $page->simpleStatsImage() ?>
      <nav class="navbar navbar-expand-md">
        <div class="container-fluid">

I've tried to use the Singletons too but I only get an error (I don't know what Libary I need to import ^^)

Hope that somebody can help me :)

JavaScript tracking script to bust CDN cache

Right now my site sits behind Cloudflare CDN that do page caching which means if you hit the cache you aren't hitting Kirby thus SimpleStats won't register the visit.

It would be very useful have a companion JavaScript file that can talk to SimpleStats and punch through CDN caching.

Use page unique IDs

Now, slugs are used in SimpleStats, Kirby has a new page UID system.

  • Page UIDs seem not to be enabled by default in Kirby, how to keep compatibility with both ?
  • Provide a migration tool, probably move to a new DB file version ?
  • Currently nums are mistakenly stored in the slug : Do we need to remove them too ? (tracking probably breaks when page-sorting changes).

Column "medium" is not created in table "referrers"

First of all, thanks for this great plugin. I think it fits really nicely into the Kirby mindset 👍

I noticed my website did not track any referrers so I had a look at simplestats_errors.txt and saw hundreds of messages like General error: 1 table referrers has no column named medium. After editing the SQLite database and adding a medium column to the database it started working.

You'll probably have to add this to this line.

Feature request: ignore localhost

For development, it would be very helpful if the localhost environment was ignored.

For example, via a setting in plugins/simplestats/src/config/options.php:
tracking => ignore => localhost => true (default).

In this context, it would also be useful if certain data could be deleted manually (for example, localhost).

GDPR notice in README

Hey there,
I noticed that in your README you wrote that the fingerprint created with md5( trunc(IP) + trunc(UserAgent) + Salt ),(...) according to GDPR, seems to be considered as personal data. This could lead to people rather not using it when really your solution is actually privacy-friendly, if I understand your implementation correctly:

Since strings created with md5 cannot be restored, they are unable to identify the person they were created from. A properly truncated IP by itself would make sure that a person could not be identified by this means, and this is even more true for your hashing solution!

jm2c

Cheers,
S1SYPHOS

Previous chart color and style easier to read?

Just speaking for myself, but I much prefer the previous chart colors and style - bright, pastel colors with clear differentiation between different items, with the addition of highly visible black outline and clearly denoted data points.

I feel I need to work harder to read the chart in the new version.

[K4] Error in stats.php with page IDs consisting only of numbers

I get the message "Kirby\Cms\App::page(): Argument #1 ($id) must be of type ?string, int given, called in /.../site/plugins/simplestats/src/models/Stats.php on line 938" in backend.

I have some page IDs with numbers only (e.g. "360"), so PHP seems to treat $uid as int in this case. I was able to work around by making sure that $uid is string ($uid = strval($uid); before line 938). The diagram creation process now works as expected.

I'm running Kirby 4.1.0 on PHP 8.2.15, so I don't know if it's a case for the Kirby 4 incompatibility list or just a PHP issue.

Anyway, thanks for this great plugin!

Roles and permission related features

Currently, only "authorised user roles" can view stats in the panel and there is still some polishing to do.
Plus introducing user-permissions would be useful.

  • Double-check if all restricted zones are fully restricted.
  • Permission suggestions :
    • Be tracked (to disable tracking)
    • View stats
    • View configuration
    • Generate stats (or only locally ? or when dev=true ?)
    • Export/backup database

authorizedRoles not working properly

Description

The option authorizedRoles seems not to work properly. With the option set to admin for example, SimpleStats is still fully accessible for editor users. Only the option dismissDisclaimer => true set in site/config/config.php is ignored, meaning that the disclaimer dows show for editors.

Expected behavior
For unauthorized roles, SimpleStats should not be visible in the Panel menu.

My setup

Plainkit Kirby 3.6.1.1

Console output

code: 403
details: Array []
exception: "Kirby\\Exception\\PermissionException"
file: "api.php"
key: "error.permission"
line: 331
message: "You are not authorised to upgrade the db file."
route: "simplestats/mainview"
status: "error"
<prototype>: Object { … }
index.js:1:6814
code: 403
details: Array []
exception: "Kirby\\Exception\\PermissionException"
file: "api.php"
key: "error.permission"
line: 58
message: "You are not authorised to view statistics."
route: "simplestats/pagestats"
status: "error"
<prototype>: Object { … }
index.js:1:6814

My system

  • Device: MacBook Pro 2019
  • OS: MacOS Monterey 12.0.1
  • Browser: Opera 82, Firefox 95

Broken timeline

Hi, I've added the simplestats plugin 5 day's ago on (18-09-2023) and for some reason the page visits timeline is stuck at (01-09-2023)

image
image

Running Kirby 3.9.6.1 and plugin version 0.6.3-beta

Make simpestats Exception safe

  • Kirby\Database\Database::query() can throw errors : catch them for better error reporting.
  • Check for other throwable calls.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.