Hi, I need to add GA event tracking codes to specific buttons. Apparently they need to be pasted where each link to be tracked is in the body code. Although I can paste into the body code I don’t know how to specifically paste where the actual button is?
Thanks for the post and good question. Webflow does not support the onclick event for the native links or buttons widgets, however you can create a Click event monitor in jQuery to detect when a link is pressed and run the code that way in the Before Body section of custom code.
It can sometimes be a little complicated to setup the click monitors, what might be easier is to take the full Anchor link code snippet for a link and use a Custom code embed placed on the page where you want the link to appear and then paste in your full link code for a specific link into the embed.