matomo-org / matomo

Empowering People Ethically with the leading open source alternative to Google Analytics that gives you full control over your data. Matomo lets you easily collect data from websites & apps and visualise this data and extract insights. Privacy is built-in. Liberating Web Analytics. Star us on Github? +1. And we love Pull Requests!
https://matomo.org/
GNU General Public License v3.0
19.66k stars 2.62k forks source link

Matomo Offline : Problem pushing indexedDB request records #19750

Open utsavkoju opened 2 years ago

utsavkoju commented 2 years ago

Expected Behavior

We have a self hosted matomo server (Matomo version: 4.11.0). For one of our PWA application, we have implemented offline tracking following this guide (https://matomo.org/faq/how-to/how-do-i-set-up-matomo-offline-tracking/) . We have initialize the matomoAnalytics to store 10000s record for 30 days. The app users don't have a good connectivity so, our plan is to asking them connect to the internet once every week to push all these offline stored analytics.

Current Behavior

When the app is offline, the indexedDB has stored all the interaction we made with the app. We can even see 10 days old records store there. We take the app online, It started syncing some of these records but after a while, it failed to submit. For example: Total Request: 562 Records failed to sync: 382 We did some more interaction with our app in offline mode and try to sync again but the newer request were successfully submited leaving the older record as it is without properly syncing them.

Possible Solution

Steps to Reproduce (for Bugs)

  1. In our device, we turn off the internet and did some interaction with the application.
  2. Turn the internet on to sync these interaction after few days.

Context

As our app users are remotely located, we need to collect their interaction in offline mode. We heavily rely on these interaction for taking decision.

Your Environment

bx80 commented 1 year ago

Hi @utsavkoju, thanks for reporting this issue. I've assigned the issue for prioritization.

If you have any additional detail such as error messages then that could be helpful. It also might be worth attempting the synchronization with the Matomo tracker in debug mode to see if any additional information is shown.

utsavkoju commented 1 year ago

Hi @bx80, Thanks for the quick response. Here are the few records form the indexedDB. The browser tries to push these records but failed to do so. Let me know if you need anything else for debugging purpose. indexedDB.txt