The configuration uses the following structure:
{
trackingId: string,
trackingGA4Id: string,
tracking: {
category: string | function,
label: string | function,
value: number | function,
events: {
<EVENT_NAME1>: {
action: string | function,
category: string | function,
label: string | function,
value: number | function,
},
<EVENT_NAME2>: {
action: string | function,
category: string | function,
label: string | function,
value: number | function,
}
}
}
}
Description: The default category for the events.
Can be a string or a function1 that returns a string.
Description: The default label for the events.
Can be a string or a function1 that returns a string.
Description: The default value for the events.
Can be a number or a function1 that returns a number.
Description: A map of key-value pairs which key is an event to listen, and value is an object of the parameters to send once the event triggered.
The full events can be found here.
Description: The action to send once the <event_name> triggered.
Can be a string or a function1 that returns a string.
Description: The category to send once the <event_name> triggered. if no given uses the default category.
Can be a string or a function1 that returns a string.
Description: The label to send once the <event_name> triggered. if no given uses the default label.
Can be a string or a function1 that returns a string.
Description: The value to send once the <event_name> triggered. if no given uses the default value.
Can be a number or a function1 that returns a number.
Description: A callback1. if given, the <event_name> will reported only if the condition is true.
The default config can be found here.
1. bound to the plugin instance and gets the event as a parameter