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:
<script>window.addEventListener('load', (event) => { document.getElementById('id-of-your-form').addEventListener('submit', () => { fathom.trackEvent('form submit'); });});</script>
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).