Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No data in Sessions Stats #5

Open
agenceKanvas opened this issue Feb 19, 2024 · 24 comments
Open

No data in Sessions Stats #5

agenceKanvas opened this issue Feb 19, 2024 · 24 comments
Assignees
Labels
bug Something isn't working

Comments

@agenceKanvas
Copy link

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 !

@agenceKanvas agenceKanvas added the bug Something isn't working label Feb 19, 2024
@Pierre-Lannoy
Copy link
Owner

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
Copy link
Author

agenceKanvas commented Feb 19, 2024

Anaylics since at least 1 or 2 weeks.

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

@Pierre-Lannoy
Copy link
Owner

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

@agenceKanvas
Copy link
Author

Nothing related to Sessions or that seems related to sessions.

@Pierre-Lannoy
Copy link
Owner

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

@agenceKanvas
Copy link
Author

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

@agenceKanvas
Copy link
Author

Capture d’écran 2024-02-22 à 11 45 13 Strange, I DO have data for the device stats

@Pierre-Lannoy
Copy link
Owner

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
Copy link
Author

agenceKanvas commented Feb 23, 2024

Hello 8 I do, and it's empty

@agenceKanvas
Copy link
Author

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
Copy link
Owner

Pierre-Lannoy commented Feb 23, 2024

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
Copy link
Author

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

@agenceKanvas
Copy link
Author

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

@Pierre-Lannoy
Copy link
Owner

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

@Pierre-Lannoy
Copy link
Owner

Hello !
Is everything working smoothly now?

@agenceKanvas
Copy link
Author

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

@agenceKanvas
Copy link
Author

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

@agenceKanvas agenceKanvas reopened this May 22, 2024
@Pierre-Lannoy
Copy link
Owner

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

@agenceKanvas
Copy link
Author

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

@Pierre-Lannoy
Copy link
Owner

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

@agenceKanvas
Copy link
Author

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
Copy link
Owner

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

@agenceKanvas
Copy link
Author

Ah ah, already tried :)

@Pierre-Lannoy
Copy link
Owner

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants