Note: As of Oct 25, 2023, we no longer support
trackGoal
for new goals/events. If you’re using trackGoal
currently, it’ll continue to work, but the new way of doing events is below.- Required: the event name (set in code on your site; see below examples)
- Optional: options object (supported value:
_value
)
Here’s how to track various events and conversions in Fathom
- Track link clicks
- Track external link clicks
- Track page load conversions
- Track 404/error pages
- Track ecommerce conversions
- Track form submissions
Allowed event names
You can name your event any name you want, but avoid special characters and emojis. Event names can be anything, but most importantly, they need to be something you (and your team) can easily and instantly recognize - so you know what each event conversion means.Example code for events
Here’s an example of how events are programmed into your site:Changing how conversions are calculated
You can update how conversions are calculated in your site settings. From your dashboard, go to:Settings
> Click on your site name
> Locate Event Conversion Formula
setting in the list
By default, the conversion rate is based on Page views: Event completions / total Page views
If you switch the setting to People, the formula changes to: Event completions / total People
This lets you customise how conversions are measured based on your specific goals.
Deleting and blocking events
If you need to delete a specific event, you have a couple of options:- Delete: Simply delete the event and its data.
- Delete and block: Delete the event data and prevent data being collected for the event in the future. You can unblock the event at any time, but this will not restore the deleted data.
Manage events
button to open the Event settings page. Find the event in the list, click the ellipsis
button next to its name, and select either Delete
or Delete and block
.
If you’ve blocked an event and want to unblock it, go to the Blocked Events section at the bottom of the Event settings page, where you’ll find the option to unblock it.