Meta Google Analytics in menu

SupportCategory: TA PlutonMeta Google Analytics in menu
Fabrica Staff asked 2 years ago
Good afternoon.
I'm sorry my bad English.
I must be included in each menu button, ta-pluton theme, google analytics code. Which script should I include these codes, because the menu is generated dynamically?

Follow the Google Analytics code:

Home Menu = onclick="ga('send','event','click','home');"

Services Menu = onclick="ga('send','event','click','servico');"

I have to do this in all menus site http://www.clinicabigodinhos.com.br

Thank you and I'm waiting.
1 Answers
Rohit Staff answered 2 years ago

Hi Fabrica, the menu links are managed by the core of WordPress, not the theme. Now WordPress do not support add event to menu links. What you want to do is hacking the core function of WordPress menus. I’m afraid a theme can not do that. You can try to search a plugin for this function. Thanks!