I moved MatomoTracker().initialize() out of main.dart into some other page, where the 'visitorId' where known to be set.
The Android build works fine, but the PWA can not track events. The problem is that 'contentBase' is set to something like "http://localhost:36673/#loading/null" (this is from chrome debug). When the url is built and posted in the 'send' method, that '#' causes the parameters after url be truncated! So there is no e_c, e_a, and e_n in the sent request.
This took me some hours to find out and I solved my problem by adding contentBaseUrl parameter in initialize().
May be better if some kind of url encoding added when the url has been created in the 'send' method, before posting. Or in the initialize() at: contentBase = html.window.location.href;
I moved MatomoTracker().initialize() out of main.dart into some other page, where the 'visitorId' where known to be set.
The Android build works fine, but the PWA can not track events. The problem is that 'contentBase' is set to something like "http://localhost:36673/#loading/null" (this is from chrome debug). When the url is built and posted in the 'send' method, that '#' causes the parameters after url be truncated! So there is no e_c, e_a, and e_n in the sent request.
This took me some hours to find out and I solved my problem by adding contentBaseUrl parameter in initialize().
May be better if some kind of url encoding added when the url has been created in the 'send' method, before posting. Or in the initialize() at: contentBase = html.window.location.href;