Can we write custom events for custom components?

Currently I have a custom component called ‘Menu’. To use this, a ‘Menu’ model is created, thus it gets tracked easily in insights as all models are tracked.

I also wish to track ‘Submenu’ which is a subfield for the custom component ‘Menu’.

How can I achieve that?

Hi @olivela, great question! You can track the submenu with a custom event which you can read more about in the link below. For example, if you want to track when the submenu item is clicked just add builder.track('submenuClick') to its onClick event.