Is there any way to add on click events to the mega menu…
I need to track some of the links within google analytics in the header menu of the site.
I can easily add them to the body using this code
<a href="http://b.buzinga.com.au/contact/" onclick="ga('send', 'event', 'Phone Number', 'Clicked');">Contact Us</a> but don’t seem to be able to add code to the menu.
Got this sorted used this site to test http://www.detectingadwarespyware.com and realized all I need to do was install this plugin “WP Google Analytics Events” then use the advanced features of the menus by going to the Screen Options and selecting Show Advanced Menu Properties and selecting CSS Class to be displayed. Then I just use the custom class I created to add the Google event in the plugin I installed it is to simple once you know how.
You can close this ticket thanks.
The topic ‘Onclick Events Mega Menu’ is closed to new replies.