Open angelxmoreno opened 1 year ago
Good point! This would make it even more straight forward to use.
as part of this PR I'd like to add userInfo defaults. Here are a few mentioned in #13
import {Dimensions} from "react-native";
import Constants from "expo-constants";
import * as Localization from "expo-localization";
{
lang: Localization.locale,
res: `${Dimentions.get('screen').width}x${Dimentions.get('screen').height}`,
ua: await Constants.getWebViewUserAgentAsync(),
_id: Constants.sessionId,
}
Is your feature request related to a problem? Please describe. It would be nice if we could set default params on the instance of the tracker and have it use those values on subsequent calls.
Describe the solution you'd like have the constructor take in a
userInfo
object that it merges with the params sent to the matomo server.Describe alternatives you've considered Currently, I need to make a series of async calls to populate the userInfo object. Setting them once would improve app performance.
Additional context none