Hi,
I have been experimenting with Google Analytics goals and I need to modify button onclick attributes to capture outbound links. I have read many ways to do this in other forum posts, although I am trying to figure out the best method. I need to add:
<a href="http://www.example.com" onclick="captureOutboundLink('http://www.example.com'); return false;">Check out example.com</a>
Can I simply add this to the button’s Custom Attributes option or am I best to create functional buttons via raw content? Alternatively, is there a better method than using either of these two solutions?
Also, am I correct in thinking that it is best to not use Google Tag Manager and to add Google tags via something like the Insert Headers and Footers plugin by WPBeginner?
Google Analytics and other Google tools are so important when creating converting sites, although I cannot seem to find easy instructions how to set them up. Would it not be a great idea to create a definitive resource showing how to set up Google’s suite of tools in Pro? I’m sure that would save a great deal of work in answering user’s questions.
Thanks!

