How can I add a macro into Google Tag Manager that would get the text of the in the class="content" div as shown here:
<article class="content">
<h1>Meeting of the Committee</h1>
I'm trying to set up an Analytics event that will take the text of this h1 and put it into the event label. The action of the event will be clicking a button elsewhere on the page. So I would like this:
Category: Meeting Action: Add To Calendar Label: Meeting Of the Committee
I should also note that (annoyingly), there are multiple h1s on this page, but targeting ".content h1" will get me the text I need. I just don't know how to get that value into a macro.
Any help would be much appreciated. Thanks!