Mautic Community Forums

Add a value to a multi-select fields from tracking code

Hi, I want to add some values to a custom multi-select field from the tracking code. These are details which I can collect from the interests and behaviour of the contact in my website.



I can set a single value doing like this:



mt(‘send’, ‘pageview’, {email: "email@domain.com", flags: “value1”});



However, if later I do the same with another value, it replaces the first one, instead of adding to it.



Is it possible to add (and remove) values from a multi-select field using the Javascript tracking code?



Regards,

Xavier

Hi, I want to add some values to a custom multi-select field from the tracking code. These are details which I can collect from the interests and behaviour of the contact in my website.

I can set a single value doing like this:

mt(‘send’, ‘pageview’, {email: "email@domain.com", flags: “value1”});

However, if later I do the same with another value, it replaces the first one, instead of adding to it.

Is it possible to add (and remove) values from a multi-select field using the Javascript tracking code?

Regards,
Xavier