
The activity of your website's visitors is saved in Synerise as events. For example, opening the page is saved as the `page.visit` event.  
Sometimes, events also define the activities directed to the user, such as sending an email (`message.send`) or a web push notification (`webpush.send`).  
The application can generate these events thanks to the [implementation of a tracking code](/docs/settings/tool/tracking_codes) and/or mobile SDK.  

The events are identified by their *action* property, which takes a `<domain>.<occurrence>` format.  

You can add custom event definitions in the following ways:
- Through the interface (described in this article)
- Through the API by using the [Custom event](https://developers.synerise.com/DataManagement/DataManagement.html#operation/CustomEvent) method. When you use that method to send an action which is not known in the system, a definition is created automatically from the new data.

By default, the custom events you add have a 30-day retention period.

## Requirements
---
You must have permissions to access Data Modeling Hub and perform operations there.

## User interface of the event manager
---

#### Event list  

This section explains the columns on the list of events.  
You can define the event data displayed in the columns described below in the ["Adding event definitions" section](#in-the-web-application).

<figure><img src="/api/docs/image/54176ad07f146575310749eba44b7c2f42c1b327/docs/assets/events/_gfx/manage-enrichment.png" class="full" alt="An example event on the list of events"><figcaption>An example event on the list of events</figcaption></figure> 

| Column name      |  Description  |
|----|------|
| **Name**        | This column contains both names of the event: display name (top one) and source name (bottom one). It identifies the name of the event and lets you search the list with it.                                                                                                 |
| **Description** | This column contains the event description, this description is taken from the **Description** field from the **Overview** tab in the event details. We strongly encourage you to add description to the events you create, so other workspace users know the event purpose. |
| **Enriched by** | This column contains the catalog names which are used to enrich event information. |
| **Visibility**  | This column shows you the status of the event visibility in the filters across the Synerise platform. You can change it, by hovering a mouse cursor over the eye icon and clicking it.     <figure><img src="/api/docs/image/54176ad07f146575310749eba44b7c2f42c1b327/docs/assets/_gfx/visibility-column.gif" class="full" alt="Visibility"></figure>    |

#### List of parameters in event preview

This section explains the table in the **Parameter** section in the event details preview.  
You can find instruction on adding parameters to events in [the "Adding parameters to events" section](/docs/assets/events/adding-event-parameters#adding-parameters-to-events).


<figure><img src="/api/docs/image/54176ad07f146575310749eba44b7c2f42c1b327/docs/assets/_gfx/parameters-section-event-preview.png" class="full" alt="A fragment of event parameter list available in the Parameter section in the event detail preview"><figcaption>A fragment of event parameter list available in the Parameter section in the client.addTag detail preview</figcaption></figure> 

| Column name     |   Description  |
|----|------|
| **Name**       | Lists the event parameters attached to this event. For each parameter, it shows two versions of the parameter name: the  **Display Name**  (shown at the top) which is user-friendly, and the  **Event name**  (shown below) which is the original technical identifier used internally.                                                                                                                                                      |
| **Overwritten**                 | Indicates whether the event parameter uses the default settings inherited from the event (**OFF**), or if custom settings are applied specifically for this parameter within the selected event context (**ON**). For example, in the screenshot, the `name` parameter of the `client.addTag` uses custom settings - the `name` parameter is overwritten by `tagName` across the filters. You can change state of this setting by clicking <img src="/api/docs/image/54176ad07f146575310749eba44b7c2f42c1b327/icons/vtex-threedot-icon.png" alt="Three dot icon" class="icon"> **> Edit override** and enabling **Override settings for this event toggle** <figure><img src="/api/docs/image/54176ad07f146575310749eba44b7c2f42c1b327/docs/assets/_gfx/override-settings-for-this-event.png" class="full" alt="The Override settings for this events toggle"></figure>           |
| **Parameter description**      | Contains a description explaining the purpose of the event parameters, providing context for other workspace users.  |
| **Visibility**                  | Displays the current visibility status of the event parameter within filter lists across the Synerise platform. The status is expressed by the eye icon. The color reflects the parameter's overriding state: greyed-out means disabled, active means enabled <figure><img src="/api/docs/image/54176ad07f146575310749eba44b7c2f42c1b327/docs/assets/_gfx/parameter-visibility.png" class="large" alt="Parameter visibility legend"></figure> <br> When overriding is enabled for a specific event parameter, you can manage its visibility using the **Visibility override (Show parameter)** toggle. To access this option, click the <img src="/api/docs/image/54176ad07f146575310749eba44b7c2f42c1b327/icons/vtex-threedot-icon.png" alt="Three dot icon" class="icon"> icon and select **Edit override**. |

## Adding event definitions
---
### In the Web application

1. Go to <img src="/api/docs/image/54176ad07f146575310749eba44b7c2f42c1b327/icons/data-modeling-hub-icon.svg" alt="Data Modeling Hub icon" class="icon"> **Data Modeling Hub > Events**.
2. Click **New event**.  
**Result**: A pop-up appears. 
2. On the pop-up, fill in the fields:
    - **Event name** is the system name of an event, usually in an `context.action` format, for example `page.visit`. 
        - This name can't be changed later.
        - It must be 2-32 characters long.
        - Diacritic characters aren't allowed.
        - The following special characters are allowed: `-`, `_`, `.`
        - In event data, this value is saved in the `action` parameter.
    - **Display name** is a human-readable name shown in the **Data Modeling Hub > Events**, Automation and Decision Hubs.
    - **Description** is shown in the **Data Modeling Hub > Events** menu.
    - The **JS SDK event settings** determine how the JS SDK can use the event. Make sure you have already configured a [certificate to validate authentication tokens](/docs/assets/events/event-settings#add-a-certificate). For more details, see [Event authentication settings](/docs/assets/events/event-settings).
    <figure><img src="/api/docs/image/54176ad07f146575310749eba44b7c2f42c1b327/docs/assets/events/_gfx/event-name-description.png" class="medium" alt="Display name and description from the Settings tab shown in the event definition list after saving the settings"><figcaption>Display name and description from the Settings tab shown in the event definition list after saving the settings</figcaption></figure>
    
    - **Availability in Analytics and Automation** cannot be changed when adding a new event. You can [change this setting later](#changing-event-visibility-in-analytics).
4. Click **Create and define settings**.  
    **Result**: You are redirected to the view of event settings.  
    - In **Overview**, you can find a summary of the settings you already defined (event name, label, value type, visibility).
    - In **Event enrichment**, you can select a catalog or catalogs from which you can supply information about the event.  

        <figure><img src="/api/docs/image/54176ad07f146575310749eba44b7c2f42c1b327/docs/assets/_gfx/event-view-event-enrichment.png" class="large" alt="Unconfigured event enrichment section in the settings of an event"><figcaption>Unconfigured event enrichment section in the settings of an event</figcaption></figure>  

        1. Click **Open**.  
        2. Click **Add first catalog**.  
            **Result**: A pop-up appears.   
        3. From the **Catalog** dropdown list, select a catalog whose data will be used to enrich event parameters.  
            **Result**: The **Catalog item key** and **Event parameter** fields appear.  
        4. From the **Event parameter** dropdown list, match the event parameter with the primary key of the catalog. By clicking the eye icon next to **Primary key**, you can preview values from the primary key column.  
   When the value of the selected parameter is the same as the value in the primary key column of the catalog, the event will be enriched with data available in the corresponding row of the catalog.
       You can learn more about it in [Event parameters and enrichment](/docs/assets/events/adding-event-parameters).
       5. To add more catalogs, click **Add catalog** and repeat steps III and IV.  
       6. Confirm by clicking **Apply**.  
    - In **Parameters**, you can add event parameters which will contain information related to a particular occurrence of an event.  
        1. Click **Define**.   
            <figure><img src="/api/docs/image/54176ad07f146575310749eba44b7c2f42c1b327/docs/assets/_gfx/event-view-parameters.png" class="large" alt="Unconfigured event parameters section in the settings of an event"><figcaption>Unconfigured event parameters section in the settings of an event</figcaption></figure>  
            
           <div class="admonition admonition-tip"><div class="admonition-icon"><svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2.5"><path stroke-linecap="round" stroke-linejoin="round" d="M9.663 17h4.673M12 3v1m6.364 1.636l-.707.707M21 12h-1M4 12H3m3.343-5.657l-.707-.707m2.828 9.9a5 5 0 117.072 0l-.548.547A3.374 3.374 0 0014 18.469V19a2 2 0 11-4 0v-.531c0-.895-.356-1.754-.988-2.386l-.548-.547z" /></svg></div><div class="admonition-body"><div class="admonition-content">

           In [the "List of parameters in event preview" section](#list-of-parameters-in-event-preview), you can find description of the table available in the screen above.

           </div></div></div>

        2. Click **Include or create parameter**.
        2. To add existing event parameters:
            1. Click **Include event parameter**.  
                **Result**: A pop-up appears.  
            2. On the pop-up, select the parameters which you want to include in the event information.
            3. Optionally, if you want to apply custom settings to the parameter for a particular event, enable **Override settings for this event**. Fill out **Display name override**, **Description override**, **Value type override**, and **Visibility override**, to define custom display name, description, event parameter type, and visibility.
            3. Confirm by clicking **Apply**.  
        3. To create a parameter:
            1. Click **Create parameter**.  
                **Result**: A pop-up appears.  
            2. Fill out the configuration form according to instructions in [Adding parameters to events](/docs/assets/events/adding-event-parameters#creating-event-parameters).
3. **Optional**: On the **Display settings** tab, fill in the fields:
    - **Display name** is a short event title shown in a Profile's [event history](/docs/crm/crm-profile#activity-list).
    - **Description** is a longer description shown in a Profile's [event history](/docs/crm/crm-profile#activity-list).  
    <figure><img src="/api/docs/image/54176ad07f146575310749eba44b7c2f42c1b327/docs/assets/events/_gfx/profile-event-list.png" class="large" alt="Title and details from the Display settings tab shown in a Profile's event history"><figcaption>Display name and description from the Display settings tab shown in a Profile's event history</figcaption></figure>
    
   <div class="admonition admonition-tip"><div class="admonition-icon"><svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2.5"><path stroke-linecap="round" stroke-linejoin="round" d="M9.663 17h4.673M12 3v1m6.364 1.636l-.707.707M21 12h-1M4 12H3m3.343-5.657l-.707-.707m2.828 9.9a5 5 0 117.072 0l-.548.547A3.374 3.374 0 0014 18.469V19a2 2 0 11-4 0v-.531c0-.895-.356-1.754-.988-2.386l-.548-.547z" /></svg></div><div class="admonition-body"><div class="admonition-content">

   In **Display name** and **Description**, you can use Jinjava to refer to the event's parameters or add logic. See [instructions and examples](#using-variables-for-displaying-event-data-in-profiles).

   </div></div></div>



### By sending an event to the API

When you send a previously unknown event to the [`/v4/events` API](https://developers.synerise.com/DataManagement/DataManagement.html#tag/Events), the event's definition and parameters are automatically added to the **Data Modeling Hub > Events** view.  
Such an event has no display name, description, title, or details, and is visible in analytics.  
The event's parameters are also added, without any descriptions, and are available in analytics.  
You can edit the event definition and parameters to fill in the additional data.
## Editing event definitions

You can update an existing event. Some settings cannot be edited.


<div class="admonition admonition-important"><div class="admonition-icon"><svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2.5"><path stroke-linecap="round" stroke-linejoin="round" d="M12 8v4m0 4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z" /></svg></div><div class="admonition-body"><div class="admonition-content">

The changes may take up to an hour to apply.

</div></div></div>


1. Go to <img src="/api/docs/image/54176ad07f146575310749eba44b7c2f42c1b327/icons/data-modeling-hub-icon.svg" alt="Data Modeling Hub icon" class="icon"> **Data Modeling Hub > Events**.
2. In the list of events, find the event you want to edit.
3. Click the <img src="/api/docs/image/54176ad07f146575310749eba44b7c2f42c1b327/icons/threedoticon.png" alt="Three dot icon" class="icon" >.
4. From the list, select **Edit**.
5. In the window that appears, edit the data in the same way as when [adding the definition](#adding-event-definitions).  

### Changing event visibility in analytics

By default, each event is visible in analytics.

You can enable or disable the visibility of an event in the analytics:
1. In the list of events, hover over the visibility icon of an event.
2. Switch the toggle that appears.

### Adding parameters

See [Event parameters and enrichment](docs/assets/events/adding-event-parameters).

### Managing enrichment

See [Event parameters and enrichment](/docs/assets/events/adding-event-parameters)



## Using variables for displaying event data in Profiles

If you want insert dynamic values or even logic into an event's summary on a Profile's card, you can use Jinjava.

### Inserting event parameters

Additional [parameters](/docs/assets/events/adding-event-parameters#creating-event-parameters) which can be used as variables are stored in the `params` object in the event's data. They are accessed with the `{{ params.paramName }}` syntax.

You can also access the system parameters outside of the `params` object, for example `{{ action }}`. The `label` parameter is an exception and is always treated as an empty value.

#### Example
You can use the `params.message` property of the event from the figure below to display a dynamic Title and Details.  

In this example, a `world.greet` event with a custom `message` parameter is saved to the Profile's history:
<figure><img src="/api/docs/image/54176ad07f146575310749eba44b7c2f42c1b327/docs/assets/events/_gfx/event-raw.png" class="large" alt="Raw data view of an event"><figcaption>Raw data of an event. The highlighted "message" parameter is a custom parameter used in the examples further in this article.</figcaption></figure>

In the event definition for world.greet, `{{ params.message }}` is added to **Display name** and **Description**, the variable is processed and displayed in the event summary:  

<figure><img src="/api/docs/image/54176ad07f146575310749eba44b7c2f42c1b327/docs/assets/_gfx/event-jinja-example-config-and-result.png" class="large" alt="Display settings of the world.greet event definition with {{ params.message }} in the Display name and Description fields (top), and the corresponding result on a profile card where the variable is rendered as the text Hello world! (bottom)"><figcaption>Display settings of the world.greet event definition with {{ params.message }} in the Display name and Description fields (top), and the corresponding result on a profile card where the variable is rendered as the text Hello world! (bottom)</figcaption></figure>


### Advanced usage

You can use Jinjava elements from the following articles:
- [Jinjava tests](/developers/inserts/exptest)
- [Jinjava filters](/developers/inserts/filter)
- [Jinjava tags](/developers/inserts/tag)

#### Example
If a parameter does not exist or is an empty string, you can insert a placeholder value.

<div class="admonition admonition-important"><div class="admonition-icon"><svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2.5"><path stroke-linecap="round" stroke-linejoin="round" d="M12 8v4m0 4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z" /></svg></div><div class="admonition-body"><div class="admonition-content">

If the parameter is null, its value is processed as the string `"null"`.

</div></div></div>


In this example, the `dogname` parameter does not exist in an event's data.  
In the event definition for world.greet, the following Jinjava is added:

<figure><img src="/api/docs/image/54176ad07f146575310749eba44b7c2f42c1b327/docs/assets/events/_gfx/event-jinja-nodog-config.png" class="large" alt="Example of Jinjava IF/ELSE statement in the configuration of an event definition"><figcaption>Example of Jinjava IF/ELSE statement in the configuration of an event definition</figcaption></figure>

On a Profile card, the variables are processed and displayed in the event summary:

<figure><img src="/api/docs/image/54176ad07f146575310749eba44b7c2f42c1b327/docs/assets/events/_gfx/event-jinja-nodog-result.png" class="large" alt="Example of the above IF/ELSE statement's result in a Profile card. The IF condition was not met and the ELSE result is displayed"><figcaption>Example of the above IF/ELSE statement's result in a Profile card</figcaption></figure>