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
Download files imported locally (download address)
const { datafluxRum } = require('./lib/dataflux-rum-miniapp.js')
datafluxRum.addAction('<NAME>','<JSON_OBJECT>');
// Code example
datafluxRum && datafluxRum.addAction('cart', {
amount: 42,
nb_items: 2,
items: ['socks', 't-shirt'],
});
Introduction: (see WeChat official npm introduction method)
const { datafluxRum } = require('@cloudcare/rum-miniapp')
datafluxRum.addAction('<NAME>','<JSON_OBJECT>');
// Code example
datafluxRum && datafluxRum.addAction('cart', {
amount: 42,
nb_items: 2,
items: ['socks', 't-shirt'],
});