Google Analytics provides event tracking with the use of their code syntax in combination with their basic plugin. Since WordPress’ menu system is based on a core function, its better to use a plugin that gives you the customization ability to make it work in the menu.
Nav Menu Roles is a plugin that enables this capability to your WordPress website for free.
Enjoy
Leave a Reply