Skip to content

Instantly share code, notes, and snippets.

@vanaf1979
Last active October 8, 2022 09:47
Embed
What would you like to do?
const form = document.getElementById('my_form');
form.addEventListener('submit', function(event){
gtag('event', 'form_submit', {
event_category: 'Forms',
event_action: 'Submit',
event_label: 'Test form' // Name of your form.
});
return true;
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment