terveystalo / react-native-piwik-pro-sdk

React Native wrapper for Piwik Pro SDK
https://www.npmjs.com/package/react-native-piwik-pro-sdk
MIT License
2 stars 2 forks source link

Add custom variable tracking #17

Open aeirola opened 3 years ago

aeirola commented 3 years ago

Should support both event and visit scopes, with matching APIs. Event scoped variables should be set with the actual event, not with separate API calls.

Event scope (need to check which all events support custom variables)

trackScreen(
  path: string,
  customVariables?: Array<{
    index: number,
    name: string,
    value: string,
  }>,
)

Visit scope

setCustomVariable(index: number, name: string, value: string)

See