# How to create Custom Events?

## What are Custom Events?

Custom events are user-defined tracking actions that go beyond the standard, pre-set events (like page views or clicks). They let you capture specific interactions that matter to your product or business but aren’t covered by default tracking.

With Uzera, you can capture these events as they are triggered by your users, filter, and launch features based on them.

### Creating Custom events from Clicks

Once installed, the Uzera script starts capturing button and link clicks for you automatically.  They can be viewed in your the Insights page within each user's journey.&#x20;

Go to insights and click on any user.&#x20;

<figure><img src="/files/8wVEXddHNJDPp17wSF2L" alt=""><figcaption></figcaption></figure>

You will be able to see their journey which will include various button or link clicks.&#x20;

<figure><img src="/files/49fM89n0r0KCWF8QWfUe" alt=""><figcaption></figcaption></figure>

You can pin these events by clicking on the pin button in the right. To unpin it, click on the button again.

<figure><img src="/files/okkj6wcxCUn9yNXvtRl3" alt=""><figcaption></figcaption></figure>

### Creating Custom events with uzera() method&#x20;

Uzera script also provides a method to track custom events. To track events through this method, use the following code as a reference:

<pre class="language-javascript"><code class="lang-javascript"><strong>uzera("track", {
</strong>  event: "Feature Used", // Replace with your custom event name, required field
  data: {
    feature_name: "Export Report",
    email: "john.doe@example.com",
    workspace_id: "ws_98765",
  },
});
</code></pre>

Add this snippet in your code and replace with the data that you want to send. You can track these custom events with data or without data, but event is required.&#x20;


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://uzera.gitbook.io/uzera-help-center/user-experiences/how-to-create-custom-events.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
