Pierre-Lannoy / wp-sessions

Powerful sessions manager for WordPress with sessions limiter and full analytics reporting capabilities.
https://perfops.one/
GNU General Public License v3.0
17 stars 5 forks source link

No data in Sessions Stats #5

Open agenceKanvas opened 7 months ago

agenceKanvas commented 7 months ago

Describe the bug Even with Decalog installed and stats activated, I don't have any data in the stat page.

Capture d’écran 2024-02-19 à 11 14 16

I do have sessions here : Capture d’écran 2024-02-19 à 11 17 59

And of course the options is checked : Capture d’écran 2024-02-19 à 11 19 35

Thanks !

Pierre-Lannoy commented 7 months ago

Hello :) Since how many time do you have activated analytics? As you've installed DecaLog (which is not mandatory for Sessions), can you tell me what you see if you run the wp log metrics dump wp-cli command (only for wordpress_plugin_sessions* metrics)?

agenceKanvas commented 7 months ago

Anaylics since at least 1 or 2 weeks.

For the dump, I've attached the file : dump.txt

Pierre-Lannoy commented 7 months ago

Do you have some errors in your error log or DecaLog loggers?

agenceKanvas commented 7 months ago

Nothing related to Sessions or that seems related to sessions.

Pierre-Lannoy commented 7 months ago

OK :( So I'm going to need a bit more context. You know: versions, framework, plugins, how Sessions was installed, etc. Thanks

agenceKanvas commented 7 months ago

Plugins : dump.txt Last version of wordpress. Session was installed via the plugin installer If needed, I also am on the WordPressFR slack !

agenceKanvas commented 6 months ago
Capture d’écran 2024-02-22 à 11 45 13

Strange, I DO have data for the device stats

Pierre-Lannoy commented 6 months ago

Hello! I've asked several users who use this plugin to run tests, and we've been unable to reproduce it at all. Can you verify you have the following table in your db: xxxx_sessions_statistics?

agenceKanvas commented 6 months ago

Hello 8 I do, and it's empty

agenceKanvas commented 6 months ago

Capture d’écran 2024-02-23 à 15 13 15 Capture d’écran 2024-02-23 à 15 12 58 If that helps, that's what I have in the decalog options

Pierre-Lannoy commented 6 months ago

Unfortunately, DecaLog has nothing to do with stats in Sessions plugin…

For now, the only reason I can think of such an issue is about shutdown WP hook. Something which break its execution… If you ok with that, can you try to modify the file wp-content/plugins/sessions/includes/features/class-schema.php at line 56 an replace add_action( 'shutdown', [ self::class, 'write' ], 11, 0 ); by add_action( 'shutdown', [ self::class, 'write' ], PHP_INT_MIN, 0 ); After that (and maybe purging opcache) do you see something in the stats table?

agenceKanvas commented 6 months ago

Still empty. I logged out and logged in just in case

agenceKanvas commented 6 months ago

I installed IP Locator and I see the first session in the table !

Pierre-Lannoy commented 6 months ago

Ah! So, let's give it a little time to see if the table continues to fill up...

Pierre-Lannoy commented 6 months ago

Hello ! Is everything working smoothly now?

agenceKanvas commented 6 months ago

Stats are back. Thanks a lot. Now I have to work on them and understand how to improve everything !

agenceKanvas commented 3 months ago

Guess who's back :) Another website, another server. Sessions, IP and device installed. No stat for sessions but some for devices. Devices :

Capture d’écran 2024-05-22 à 10 34 07

Sessions (same period) :

Capture d’écran 2024-05-22 à 10 34 23
Pierre-Lannoy commented 3 months ago

That's definitely a strange issue. Is this website on the same hosting type as the last one?

agenceKanvas commented 3 months ago

Not at all. The first is on a dedicated server and the other one (this one) on a cloudways/digital ocean

Pierre-Lannoy commented 3 months ago

And is there something similar between both of them? Common framework, (mu-)plugins, cache, cdn, etc.

agenceKanvas commented 3 months ago

WooCommerce, WooCommerce Subscriptions, WooCommerce Memberships, ACF Pro, Redis i think, Stripe, Gravity Forms. These are the main plugin that are at least common on both

Pierre-Lannoy commented 3 months ago

Could you try ton install IP Locator to see if it's modifying something (like the other site)

agenceKanvas commented 3 months ago

Ah ah, already tried :)

Pierre-Lannoy commented 3 months ago

Have you tried to deactivate (or disable) all caching mechanisms (like redis, apcu, etc.) to see if it changes something? Could you confirm, too, the Sessions analytics db tables are created?