I need help with figuring out how to add onclick button event code to a submit button on the HubSpot form. I noticed that I can't access the button with JS. I tried adding an attribute of onClick but it didn't work for items within the shortcode - like submit button.
The onclick button event code I have looks like this:
onclick="dataLayer.push({'event': 'Newsletter', 'eventCategory': 'email', 'eventAction': 'submit'})"
Please help. I have no idea what I need to do here.