> For the complete documentation index, see [llms.txt](https://docs.devhub.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.devhub.com/analytics/custom-events.md).

# Custom events

For consistency with the [automatically tracked events](/analytics/what-events-are-tracked-automatically.md), we suggest that custom events be named using only lower case letters, numbers and using dashes (`-`) instead of spaces.

Example: `link-to-inventory` or `gated-pdf-form-submit`

## Link click events

```markup
<a href="/some-link/" data-sb-custom-event="link-to-inventory">
    View our inventory
</a>
```

## Form submit events

Note: If you created the form using our Form Builder module, then you can add the custom event name to the "Custom Event" field under the advanced options for the form.

```markup
<form method="post" action="/"
      data-sb-custom-event="gated-pdf-form-submit">
...form here...
</form>
```
