We have added the pushInstruction('key', ...args) function in the utils.js file, as it was the only one missing, to set custom settings to the Matomo instance.
This function can be used to pass additional features to Matomo.
import { pushInstruction } from '@eeacms/volto-matomo/utils';
// Example with multiple parameters
pushInstruction('setCustomDimension', 1, 'Hello world!');
// Example with one parameter
pushInstruction('setUserId', 'user_id');
We have added the
pushInstruction('key', ...args)
function in the utils.js file, as it was the only one missing, to set custom settings to the Matomo instance.This function can be used to pass additional features to Matomo.
The signature of pushInstruction is in the base code of matomo-tracker and allows passing arbitrary number of arguments.