radarlabs / react-native-radar

React Native module for Radar, the leading geofencing and location tracking platform
https://radar.com
Apache License 2.0
170 stars 32 forks source link

Passing dynamic metadata during application tracking #107

Closed valarmathiarikrishnan closed 4 years ago

valarmathiarikrishnan commented 4 years ago

Passing dynamic metadata during application tracking

On user registration we allow a bunch of parameters (i.e key/value pairs) to be set as part of user.metadata.. While tracking the user, the same information is being sent from the device. Isn't this redundant since I can get this information from the user itself and would I be able to send additional dynamic information based on what the application observes.

location: { "user": { "foreground": false, "stopped": false, "geofences": [ { "description": "test", "externalId": "foo", "tag": "React", "_id": "ddgst45568jkjl" } ], "metadata": { "foo": "bar", "baz": true, "qux": 1 }, "deviceId": "f4fc1d2a6ad59f4a", "userId": "foo", "_id": "safdshdgfjhgk" }, "location": { "longitude": -122.084, "latitude": 37.4219983 } }

nickpatrick commented 4 years ago

Hey @arimathi14, thanks for the feedback. For now you'll need to continue to pass the full metadata bundle. I would consider saving it locally and modifying as needed.