Get and set

Get data

You can set information in the following way. This will either add or overwrite existing information. Do note you should be sure to set this before data is being send to an endpoint.

rumv('set', 'template_type', 'contact');

Set data

Our tracking JavaScript will grab all kind of information, based on the features you enabled within your tracking configuration. You can re-use this data, which can be convenient from different perspectives.

For example, if we collected country-information already, you don't need to do yet another API to a geographical endpoint to get the user's country.Instead, you can ask our snippet for this information:

rumv('get', 'country');

Do note that whenever you disable tracking the country of a user, any functionality that you've build on top of this could break as well. You could either:

  • be sure to build in a fallback;
  • or subscribe to changes of the tracking configuration. You could do so by installing an existing app from our default configurations, that will then ping you to a pre-configured channel as soon as changes are made.

Setting a callback 

Some getters won't have information right away. In the above example of re-using country information, our JavaScript might need to do a API call first to get the information.

Instead of returning a value right away, our JavaScript will call a callback you passed to our get function. Your callback will then be called when the information is available.