Source: https://nishanth-fern-test.docs-staging.pageloop.ai/analytics/creating-a-user-action

# Create an Event

Whatfix enables you to track events on elements in your application to see how end users engage with a feature. For example, track how many end users click the **Reports** tab in your application.

Expand the following accordions for more details:

**Track an Untracked event**

Untracked events are elements that end users click in your application. Whatfix captures these clicks with Default tracking and lists the most-clicked elements under **Suggested events to track**.

Use the following steps to track an Untracked event:

1. Log in to your application, and then launch the **[Whatfix Studio](/web/how-to-install-the-whatfix-editor)**.

![CLM\_editor plug in2](/images/f6/CLM_editor-plug-in-2-f67cdef9.png)

1. In the **Events** section, click **Track event**. ![Track\_event.png](/images/c6/Track_event-c68c0de6.png)

> [!INFO]
>
> Click **Refresh page** to ensure Preview Mode is enabled. ![Click\_Refresh\_page.png](/images/cd/Click_Refresh_page-cd9fb0b1.png)

2. The **Tracking events** panel opens. On the **Untracked events** tab, Whatfix lists **Suggested events to track**, sorted by highest clicks.

![Track\_event\_panel.png](/images/be/Track_event_panel-bed32ca5.png)
3\. To track a suggested event, click the **Plus** icon next to it. ![Click\_plus\_icon.png](/images/c6/Click_plus_icon-1-c6916e86.png)
4\. Review the event name, and then edit it if required. ![Click\_element.png](/images/84/Click_element-849cb595.png)

> [!INFO]
>
> Whatfix names the event based on the element, for example, **Click ‘Opportunities’**. Choose a name that makes the event easy to find on the [**Whatfix Analytics dashboard**](/analytics/how-can-i-access-the-product-analytics-dashboard).

5. From the **Trigger** dropdown, select the action that end users perform on the element. For more information, see [What are User Action Completion Rules?](/analytics/what-are-user-action-completion-rules) ![Trigger\_dropdown..png](/images/25/Trigger_dropdown.-25750b89.png)
6. To add a tag, click **Add tag**. This step is optional.

![Add\_tag.png](/images/5d/Add_tag-5d42406f.png)

> [!INFO]
>
> - Select the [tag](/web/what-are-tags) from the dropdown and then click **Done**. ![Click\_done.png](/images/90/Click_done-2-90de6506.png)
> - If the tag does not exist, type in the name of the tag and hit the **Enter** key to create a new tag.

7. In **Review selected element** section, click **Preview** icon to verify the element. ![Click\_preview.png](/images/4b/Click_preview-1-4b8fbde2.png)

> [!INFO]
>
> Select the **Hide Preview** icon to stop highlighting the selected element on the application. ![View\_element.png](/images/e4/View_element-e4bfe3fc.png)

8. To select a different element, click **Reselect element**. ![Reselect\_element.png](/images/ed/Reselect_element-1-edef36ba.png)
9. In **Choose tracking mode**, select one of the following options:

![Choose\_tracking\_mode.png](/images/85/Choose_tracking_mode-85dd0f25.png)

1. **Default tracking**: Whatfix decides how to track the element. Default tracking includes past click data for the element, so you can analyze clicks that happened before you saved the event.

> [!INFO]
>
> - Click **View element selectors** to view the selector Whatfix uses for **Default tracking**. ![Click\_view\_selector.png](/images/de/Click_view_selector-de9fa3e0.png)
> - If Whatfix cannot identify the element clearly, Whatfix displays a message. In that case, select **Advanced tracking**.

2. **Advanced tracking**: You define where and how to track the element. Advanced tracking doesn’t include historical data.
3. Select **Advanced tracking** and click **Confirm** in the **Switch to advanced tracking?** dialog box. ![Click\_Confirm.png](/images/c5/Click_Confirm-c539ae7a.png)

> [!INFO]
>
> Tracking for the event starts on the day you save and publish the event.

11. Under **Advanced tracking**, click **Element precision**.

![Element\_precision.png](/images/e3/Element_precision-e3f06f41.png)
12\. From the **How would you like to identify the element?** dropdown, select **Using CSS selector**, **Using jQuery selector**, or **Using element text**. For more information, see [Identify an element's CSS selector](/web/identify-an-elements-css-selector). ![element\_precision\_dropdown.png](/images/f7/element_precision_dropdown-f77a5140.png)

> [!INFO]
>
> Whatfix adds the **Default tracking** selector as the first element precision rule.

13. Enter the **Value**. ![add\_value.png](/images/47/add_value-47e56811.png)

> [!INFO]
>
> To add more conditions, click **Add condition**. ![click\_add\_condition.png](/images/31/click_add_condition-316d1a30.png)

14. Click **S\*\*\*\*ave** **rule**. ![Click\_rule\_event.png](/images/b5/Click_rule_event-b5d01795.png)
15. Under **Advanced tracking**, click **Visibility rules**. ![Visibility\_rules.png](/images/53/Visibility_rules-53a0461f.png)
16. From the **Show on** dropdown, click **Open Menu** icon. ![Visibility\_rule\_show\_on.png](/images/c1/Visibility_rule_show_on-c18695cd.png)
17. Set the required condition. For more information, see [Understand New Visibility Rules for Content](/web/understand-advanced-visibility-rules-for-content). ![Select from dropdown.png](/images/6f/Select-from-dropdown-6fc22034.png)
18. Select the operator from the dropdown. ![Select\_operator.png](/images/75/Select_operator-7585c415.png)
19. Enter the required **Domain** name. For example, **Whatfix**. ![Add\_visibility\_rule.png](/images/11/Add_visibility_rule-11293d49.png)

> [!INFO]
>
> To add more conditions, click **Add condition**. ![Add\_condition\_visibility\_rule.png](/images/34/Add_condition_visibility_rule-349ddcec.png)

20. Click **Save rule**. ![Click\_rule\_event.png](/images/b5/Click_rule_event-b5d01795.png)
21. Click **Save**. ![Click\_save.png](/images/d7/Click_save-3-d78d0751.png)

To create a new event on the same or different page, launch **Whatfix Studio** again and follow the same process.

**Track a new event**

Use the following steps to track a new event:

1. Log in to your application, and then launch the **[Whatfix Studio](/web/how-to-install-the-whatfix-editor)**.

![CLM\_editor plug in2](/images/f6/CLM_editor-plug-in-2-f67cdef9.png)

1. In the **Events** section, click **Track event**. ![Track\_event.png](/images/c6/Track_event-c68c0de6.png)

> [!INFO]
>
> Click **Refresh page** to ensure Preview Mode is enabled. ![Click\_Refresh\_page.png](/images/cd/Click_Refresh_page-cd9fb0b1.png)

2. Click **Track new event**. ![Click\_track\_new\_event.png](/images/d6/Click_track_new_event-d69fbeea.png)
3. On your application, select the element you want to track. ![Track\_event\_panel.png](/images/be/Track_event_panel-bed32ca5.png)
4. Review the event name, and then edit it if required. ![Click\_element.png](/images/84/Click_element-849cb595.png)

> [!INFO]
>
> Whatfix names the event based on the element, for example, **Click ‘Opportunities’**. Choose a name that makes the event easy to find on the [**Whatfix Analytics dashboard**](/analytics/how-can-i-access-the-product-analytics-dashboard).

5. From the **Trigger** dropdown, select the action that end users perform on the element. For more information, see [What are User Action Completion Rules?](/analytics/what-are-user-action-completion-rules) ![Trigger\_dropdown..png](/images/25/Trigger_dropdown.-25750b89.png)
6. To add a tag, click **Add tag**. This step is optional. ![Add\_tag.png](/images/5d/Add_tag-5d42406f.png)

> [!INFO]
>
> - Select the tag from the dropdown and then click **Done**. ![Click\_done.png](/images/90/Click_done-2-90de6506.png)
> - If the tag does not exist, type in the name of the tag and hit the **Enter** key to create a new tag.

7. In **Review selected element**, click **Preview** icon to verify the element. ![Click\_preview.png](/images/4b/Click_preview-1-4b8fbde2.png)

> [!INFO]
>
> Select the **Hide Preview** icon to stop highlighting the selected element on the application. ![View\_element.png](/images/e4/View_element-e4bfe3fc.png)

8. To select a different element, click **Reselect element**. ![Reselect\_element.png](/images/ed/Reselect_element-1-edef36ba.png)
9. In **Choose tracking mode**, select one of the following options: ![Choose\_tracking\_mode.png](/images/85/Choose_tracking_mode-85dd0f25.png)
10. **Default tracking**: Whatfix decides how to track the element. Default tracking includes past click data for the element, so you can analyze clicks that happened before you saved the event.

> [!INFO]
>
> - Click **View element selectors** to view the selector Whatfix uses for **Default tracking**. ![Click\_view\_selector.png](/images/de/Click_view_selector-de9fa3e0.png)
> - If Whatfix cannot identify the element clearly, Whatfix displays a message. In that case, select **Advanced tracking**.

2. **Advanced tracking**: You define where and how to track the element. It does not includes historical data.
3. Select **Advanced tracking** and click **Confirm** in the **Switch to advanced tracking?** dialog box. ![Click\_Confirm.png](/images/c5/Click_Confirm-c539ae7a.png)

> [!INFO]
>
> Tracking for the event starts on the day you save and publish the event.

11. Under **Advanced tracking**, click **Element precision**. ![Element\_precision.png](/images/e3/Element_precision-e3f06f41.png)
12. From the **How would you like to identify the element?** dropdown, select **Using CSS selector**, **Using jQuery selector**, or **Using element text**. For more information, see [Identify an element's CSS selector](/web/identify-an-elements-css-selector). ![element\_precision\_dropdown.png](/images/f7/element_precision_dropdown-f77a5140.png)

> [!INFO]
>
> Whatfix adds the **Default tracking** selector as the first element precision rule.

13. Enter the **Value**. ![add\_value.png](/images/47/add_value-47e56811.png)

> [!INFO]
>
> To add more conditions, click **Add condition**. ![click\_add\_condition.png](/images/31/click_add_condition-316d1a30.png)

14. Click **Save** **rule**. ![Click\_rule\_event.png](/images/b5/Click_rule_event-b5d01795.png)
15. Under **Advanced tracking**, click **Visibility rules**. ![Visibility\_rules.png](/images/53/Visibility_rules-53a0461f.png)
16. From the **Show on** dropdown, click **Open Menu** icon. ![Visibility\_rule\_show\_on.png](/images/c1/Visibility_rule_show_on-c18695cd.png)
17. Set the required condition. For more information, see [Understand New Visibility Rules for Content](/web/understand-advanced-visibility-rules-for-content).

![Select from dropdown.png](/images/6f/Select-from-dropdown-6fc22034.png)
18\. Select the operator from the dropdown. ![Select\_operator.png](/images/75/Select_operator-7585c415.png)
19\. Enter the required **Domain** name. For example, **Whatfix**. ![Add\_visibility\_rule.png](/images/11/Add_visibility_rule-11293d49.png)

> [!INFO]
>
> To add more conditions, click **Add condition**.
>
> ![Add\_condition\_visibility\_rule.png](/images/34/Add_condition_visibility_rule-349ddcec.png)

20. Click **Save rule**. ![Click\_rule\_event.png](/images/b5/Click_rule_event-b5d01795.png)
21. Click **Save**. ![Click\_save.png](/images/d7/Click_save-3-d78d0751.png)

To create a new event on the same or different page, launch **Whatfix Studio** again and follow the same process.

> [!INFO]
>
> - Under the **Tracking events** panel, on the **Tracked events** tab, Whatfix lists:
>   - **Visible events**: Events linked to elements that you can see on the current page.
>   - **Events not visible**: Events linked to elements that you can’t see on the current page. ![Tracked\_events.png](/images/d2/Tracked_events-d2c9aa72.png)
> - Click any event to **Edit Event**. For more information see, [**Edit an Event**](/analytics/editing-a-user-action).

> [!WARNING]
>
> - Use **Collect more information** to capture values from elements on the page when the event triggers. For more information, see [Capture Event Attributes](/analytics/capture-event-attributes).
> - Tracked events do not have any visual characteristics and cannot be previewed using the **Preview Mode**. However, Whatfix enables you to verify and validate if the events are created and saved correctly. For more information, see [Verify Track Events](/analytics/user-action-verification) experience.
> - After creating and [verifying](/analytics/verify-user-actions) the event, you have to **Publish** the event so it starts capturing data. For more information, see [Publish the event](/analytics/publish-user-actions).
> - Once the events are live, monitor usage and engagement of the events. For more information, see [Get Event Analytics](/analytics/user-action-analytics).

## Related

- [User Action Best Practices](/analytics/user-action-best-practices)
