Customize to Add Additional Data TAG¶
After initializing RUM, use the addRumGlobalContext(key:string, value:any)
API to add additional TAGs to all RUM events collected from the application.
Add TAG¶
window.DATAFLUX_RUM && window.DATAFLUX_RUM.addRumGlobalContext('<CONTEXT_KEY>', '<CONTEXT_VALUE>');
// Code example
window.DATAFLUX_RUM && window.DATAFLUX_RUM.addRumGlobalContext('isvip', 'xxxx');
window.DATAFLUX_RUM && window.DATAFLUX_RUM.addRumGlobalContext('activity', {
hasPaid: true,
amount: 23.42
});
DATAFLUX_RUM.onReady(function() {
DATAFLUX_RUM.addRumGlobalContext('<CONTEXT_KEY>', '<CONTEXT_VALUE>');
})
// Code example
DATAFLUX_RUM.onReady(function() {
DATAFLUX_RUM.addRumGlobalContext('isvip', 'xxxx');
})
DATAFLUX_RUM.onReady(function() {
DATAFLUX_RUM.addRumGlobalContext('activity', {
hasPaid: true,
amount: 23.42
});
})