Skip to content

Custom Add Action


After initializing RUM, use the addAction('<NAME>', '<JSON_OBJECT>') API to customize and add action metrics other than those collected.

Add Action

window.DATAFLUX_RUM && window.DATAFLUX_RUM.addAction('<NAME>''<JSON_OBJECT>');

// Code example
window.DATAFLUX_RUM && window.DATAFLUX_RUM.addAction('cart', {
    amount: 42,
    nb_items: 2,
    items: ['socks', 't-shirt'],
});
DATAFLUX_RUM.onReady(function() {
    DATAFLUX_RUM.addAction('<NAME>''<JSON_OBJECT>');
})

// Code example
DATAFLUX_RUM.onReady(function() {
    DATAFLUX_RUM.addAction('cart', {
    amount: 42,
    nb_items: 2,
    items: ['socks', 't-shirt'],
});
})
import { datafluxRum } from '@cloudcare/browser-rum'
datafluxRum.addAction('<NAME>''<JSON_OBJECT>');

// Code example
datafluxRum && datafluxRum.addAction('cart', {
    amount: 42,
    nb_items: 2,
    items: ['socks', 't-shirt'],
});              

Feedback

Is this page helpful? ×