donni106 / matomo-tracker-react-native

Stand alone library for using Matomo tracking in React Native and Expo projects.
MIT License
47 stars 15 forks source link

Automatically send device information #3

Closed angelxmoreno closed 3 years ago

angelxmoreno commented 3 years ago

It would be phenomenal if this module would send device information from the expo-devices or expo-constants modules along with the tracking events.

I am unable to find where i can set my device type.

Looking at https://developer.matomo.org/api-reference/tracking-api#optional-user-info it seems like this "extra" information can be set as custom variables (https://matomo.org/docs/custom-variables/).

donni106 commented 3 years ago

Thanks @angelxmoreno, it is a good point. I already thought about it, because it is a common feature. Let us see, how we can manage it. This is definitely possible.

KarlaSaenz commented 3 years ago

+1 Please add this feature

donni106 commented 3 years ago

@angelxmoreno @KarlaSaenz which data from expo-device, expo-constants and/or react native dimensions could you think of having with the matomo tracking as optional user info?

I think the device brand and model name can be useful as well as the resolution of the device the visitor is using. These could be a first step.

angelxmoreno commented 3 years ago

I'll get a list out with sample values

donni106 commented 3 years ago

I have opened a PR which allows passing additional optional user info params! This will be released in version 0.3.0 soon.

donni106 commented 3 years ago

0.3.0 is available now!