Floating-Dartists / matomo-tracker

A fully cross-platform wrap of the Matomo tracking client for Flutter, using the Matomo API.
https://pub.dev/packages/matomo_tracker
MIT License
25 stars 26 forks source link

I am experiencing a 403 error when sending tracking data to my Matomo server using the matomo_tracker package in my Flutter app #56

Closed devzhr closed 1 year ago

devzhr commented 1 year ago

Describe the bug I am experiencing a 403 error when sending tracking data to my Matomo server using the matomo_tracker package in my Flutter app. The same URL works fine when used in native apps (Swift).

To Reproduce Steps to reproduce the behavior:

  1. Create a new Flutter app and add the matomo_tracker package as a dependency
  2. Configure the MatomoTracker with the following settings:
    MatomoTracker.instance.initialize(
      siteId: 6,
      url: 'https://matomo.exemple.com/piwik.php',
    );
  3. The server responds with a 403 error.

Expected behavior The tracking data should be sent successfully to the Matomo server without a 403 error.

Smartphone (please complete the following information):

Additional context The same Matomo URL works fine in native apps (Swift). I have already checked the Matomo server settings, site ID, and token authorization, but the issue persists.

Please let me know if there's any known issue or solution for this problem.

TesteurManiak commented 1 year ago

Can you provide the cURL of the failing request? Which version of the package are you using? (are you pointing to pub.dev or the GitHub repo?) Have you tried to replace piwik.php by matomo.php? Both are supposed to work the same.

devzhr commented 1 year ago

Thank you Maniak for your answer

the same request works with postman and not with flutter i used 2.0.0 i tried both piwik.php and matomo.php

TesteurManiak commented 1 year ago

Ok but can you provide the cURL of the failing request (you can find it in the network tab of the dart devtools). This will help to identify what might be going wrong with the request sent from the package.

github-actions[bot] commented 1 year ago

This issue is stale because it has been open 20 days with no activity. Remove stale label or comment or this will be closed in 5 days.

github-actions[bot] commented 1 year ago

This issue was closed because it has been stalled for 5 days with no activity.

4gmayank commented 1 year ago

You may use MatomoTracker.instance.initialize( siteId: 6, url: 'https://myhost.matomo.cloud/matomo.php', );