Closed adgeg closed 1 year ago
Have you tried to track the dimension like this instead ?
MatomoTracker.instance.trackScreen(
context,
eventName : 'screen1',
dimensions: {'dimension1' : 'value1'},
);
Hello @TesteurManiak , it works the way you propose, and that's what we do now. But the comprehension of the method trackDimensions
is misleading if we still need to call dimensions parameter later in following trackScreen/Event…
.
Furthermore, in the pub.dev page of your library, it is mentioned that it should work "at a visit level" if we call trackDimensions
.
If you want to track Visit or Action dimensions you can either use the trackDimensions (if it's a Visit level dimension) or provide data in the optional dimensions param of trackEvent (if it's an Action level dimension):
Maybe I am doing something wrong, but currently it's not working at a visit level at all.
Yeah you are right, I'll take a deeper look on this method, this feature was implemented by someone who is not a maintainer on the repo.
Hmm. And you have defined the dimension as a visit level dimension in Matomo?
I just tested on version 2.0.0 and seems to be sending fine the visit dimension using trackDimension
, and for that matter also with trackEvent
, in the main.dart
of my flutter app.
Matomo request:
Matomo tracking the dimension:
Matomo Custom Dimensions setup:
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.
Hello @petcupaula, sorry I just see your message now. Dimensions were properly set on our project for a very long time. Before using your library ,we made a fork of dart-matomo to achieve dimensions. And it used to work perfectly fine.
We don't really use trackEvent
, but for the trackScreen
methods, when I inspect network requests, not any information about previously set dimensions are present.
Now we use the dimensions
parameter of the track
methods, and it work as expected, even if we add to adjust in some way our calls:
void setDimensions(Map<String, String> dimensions) {
_dimensions = dimensions.map((key, value) => MapEntry('dimension$key', Uri.encodeComponent(value)));
}
BTW, our project is open-source, so here is the "wrapping" we have achieved for our goals.
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.
This issue was closed because it has been stalled for 5 days with no activity.
Hi,
Fist of all, thanks for your great job.
Describe the bug When we call
trackDimensions()
method, the following calls totrackEvent()
,trackScreen()
etc… do not set dimensions, and we don't have any dimensions available in Matomo dashboard.To Reproduce Steps to reproduce the behavior:
MatomoTracker.instance.trackDimensions({'dimension1' : 'value1'});
MatomoTracker.instance.trackScreen(context, eventName : 'screen1');
Expected behavior After a call to
trackDimensions
, dimensions should be usable in Matomo dashboard.Additional context Matomo tracker version : 2.0.0