Skip to main content
Support home / Event conversions

Track form submissions

If you can edit the HTML of your form, you can fire off an event when a form is submitted to track form submission conversions:

<form method="post" onsubmit="fathom.trackEvent('form submit');">

And you’d replace form submit with an Event name of your choosing, which would then show up on your dashboard.

If you cannot edit the form code, but the form has an ID (or you can give the form an ID), you can add the following script after/below the form:

window.addEventListener('load', (event) => {
document.getElementById('id-of-your-form').addEventListener('submit', () => {
fathom.trackEvent('form submit');

Where id-of-your-form is the actual ID of your form, and form submit is the Event name you want to use for this event. Again, you could also send over the ID of the form (similar to our example above with sending over the href values of the files being downloaded).

If you still have questions or require help with anything, please reach out to us and we'll happily get things sorted out for you.

Can't find what you're looking for?