Skip to main content
Support home / Event conversions

Creating and using events

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.

Events (also called goals or conversions) allow you to track actions that visitors take on your site. For example, button clicks, form submissions, newsletter sign-ups, and even e-commerce conversions like starting a free trial or buying a product could all be events you create.

Events currently include one required variable (the event name) and then support 3 optional parameters

  1. Required: the event name (set in code on your site; see below examples)
  2. Optional: options object (supported values are _site_id and _value)

Always make sure that you add the event code after your embed code. We also do not track events locally, as they require https/http to function.

You also cannot rename an event once it’s been created and fired off to your dashboard but you can easily change the event name you're sending us from your code.

Here's how to track various events and conversions in Fathom

Watch a video tutorial on simple events.

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:

fathom.trackEvent('cart add', {
_value: 100, // Value in cents
});

Here’s an example of a simple event without a value or overriding Site ID:

fathom.trackEvent('newsletter signup');

Using events with GTM (Google Tag Manager)

If you're looking for ways to use Fathom events in GTM, take a look at our tailored examples for GTM in our GTM documentation.


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?