Hey #WordPress friends, what's your favourite statistics plugin which is *not* JetPack.
-
Terence Edenreplied to Torsten Landsiedel last edited by
@Zodiac1978
Cheers mate. I'll take a look this week. Much appreciated. -
:wordpress: Jackreplied to Terence Eden last edited by
@Edent I don’t use a WordPress plugin but use Plausible on my WordPress sites. Not sure if that’s what you were looking for or were only interested in a plugin specifically?
-
Danny van Kootenreplied to Terence Eden last edited by
@Edent That looks pretty close to Koko's database table structure already tbh. If you have SQL access or something like PHPMyAdmin I believe MySQL can run an import query from CSV?
I'll take a closer look tomorrow when behind my computer. But from a first look, it looks very doable!
-
@Edent Koko on all my sites
-
Terence Edenreplied to :wordpress: Jack last edited by
@jackmcconnell
I think I'd prefer a plugin so I can easily integrate pageview counters into each post. -
Right, I've written some code to export all of my #JetPack stats.
5,458 JSON files - one for every day.
Now I just need to find a #WordPress stats plugin with a simple enough database schema that I can backfill.
Currently evaluating Matomo, Statify, and Koko.
-
Timo Zimmermannreplied to Terence Eden last edited by
@Edent not sure if you ruled it out already, but plausible might be an option and has a convenient CSV importer for historic data.
Might be possible to massage the JSON data in a compatible CSV if the platform looks like a viable option.
-
Terence Edenreplied to Danny van Kooten last edited by
@dvk
So, if I've understood this right...
wpbp_koko_analytics_site_stats has the daily summary of the *total* views.
wpbp_koko_analytics_post_stats has the daily *individual* post views?So I'm pretty sure I can just manually enter what I want in there.
Is wpbp_koko_analytics_site_stats calculated or checked from the other table?
Ta! -
Terence Edenreplied to Timo Zimmermann last edited by
@fallenhitokiri I looked - but it would cost me about £200 per year!
-
Danny van Kootenreplied to Terence Eden last edited by
@Edent First part is exactly right!
The site_stats table is not calculated from the other table, but for the pageviews column it could be. Visitors column is not possible since a single visitor could visit multiple pages, thus incrementing the visitor column for multiple rows in the page_stats table.
-
Terence Edenreplied to Danny van Kooten last edited by
@dvk cheers!
Last question (I hope!) - is there a <noscript> version? I see there's a custom endpoint - but I guess that has to be called by JS? -
Leonardo Di Ottioreplied to Terence Eden last edited by
@Edent I have used Matomo at many different places and am quite happy with it.
It also has a feature to import server logs (https://matomo.org/guide/tracking-data/import-server-logs/) that you might be able to use to backfill your data. I’ve never done that myself, though, so don't know how good that would work.
-
Danny van Kootenreplied to Terence Eden last edited by
@Edent There is a REST API endpoint that can be queried to get the stats in JSON.
As for a noscript version of the dashboard itself; that's literally what I am working on right now. Everything but the chart will be rendered server side and only progressively enhanced if JS is available.
Super curious what you need it for though. With WP loading in megabytes of JS, I mostly feel this effort I'm making right now was wasted. Can you elaborate?
-
Terence Edenreplied to Danny van Kooten last edited by
@dvk ah, sorry, I meant a <noscript> way of recording a visit.
At the moment, it looks like it loads up the JS and pings the endpoint. If a visitor has JS disabled, is there a way to track them?
-
Danny van Kootenreplied to Terence Eden last edited by
@Edent Ahh sorry, yeah, that makes more sense.
You can load the endpoint through an <img> element as long as you ensure that the following query parameters are set:
- `p` containing the post or page ID
- `nv` whether this is a new visitor
- `up` whether this is an unique pageview from this visitor[1/2]
-
Danny van Kootenreplied to Danny van Kooten last edited by
Unless you're using the cookie option and are not serving HTML from cache, you'll probably want to set the latter two parameters to `0`.
Make sure to put the <img> inside <noscript> to prevent duplicate counts.
[2/2]
-
Terence Edenreplied to Danny van Kooten last edited by
@dvk You star, thanks!
I've managed to get my stats exported as a CSV, so will try loading them in.
Will write up a blog post soon.