Can anybody tell me how I can add a "data-track" tag to the links in my menu. When I go to the dashboard -> menus, I can add any custom HTML.
I would like it to go from this:
<a href="http://www.detailingwiki.org/articles/">Article index</a>
<a data-track="navigation|click|article-index" href="http://www.detailingwiki.org/articles/">Article index</a>
The first part of the code can always be the same (i.e. "data-track="navigation|click") the part at the end should copy the text from the link. In the example above that is "article-index", but it should just take whatever the text for the link is. (not sure if spaces are allowed....)
I haven't been able to do it myself, and I don't want to edit the core wordpress files.