JointsWP-CSS
JointsWP-CSS copied to clipboard
JointsWP - Adding analytics tracking code to top nav help
I was hoping someone could help me add analytics tracking code to the top nav. I've looked at the functions/menu.php file but it only addressed the <ul>
portion and not the <li><a>
portion that I need to add the tracking code to.
For example, I'd like something like this:
<li><a href="/gallery" onClick="ga('send', 'event', 'TopNav', 'Click', 'Gallery');">Gallery</a></li>
Then of course I'd like Gallery to change to Homepage, News, etc depending on what the link was pointing to.
Any solutions would be really helpful! Thank you.
(PS: Love JointsWP, I've been using it for developing sites like http://marketstreetprototyping.org/, http://groundplaysf.org, http://www.rentsfnow.com (redesign coming) - definitely my go-to wordpress theme!!)