# Custom queries and reference for the Custom Events Explore

Use the Custom Events Explore to query Custom Event metrics, list users by event, and find peak engagement times.

This Explore allows you to get detailed metrics for your [Custom EventsEvents that indicate that a user performed a predefined action, such as adding an item to a shopping cart, viewing a screen, or clicking an Unsubscribe button. Custom Events can trigger automation, including Sequences and Scenes. You can code them into your app or website, or send them to Airship from an external source using the Custom Event API. Custom Events contain properties that you can use to personalize messages.](/docs/guides/audience/events/custom-events/).

Data availability depends on your [Performance Analytics plan](https://www.airship.com/docs/reference/feature-packages/#data).

## Navigation

To access the Explore:

1. Go to **Reports**, then **Performance Analytics**.
2. Select the folder icon (), then **Shared**.
3. Under **Looks**, select **Explore Glossary** (**Explore Glossary EUCS** for EU customers).
4. Select **Custom Events**, then **Navigate to Explore**.

For a list of all Explores in the glossary, see [Predefined Explores](https://www.airship.com/docs/guides/reports/analytics/exploring/exploring/#predefined-explores) in *Exploring Performance Analytics data*.

## Field categories

The sidebar lists categories for various filters, DimensionsGenerally, a string field in Performance Analytics. They can be grouped and can act as filters or members of a data set., and MeasuresA numeric field in Performance Analytics — like a count or sum. Measures appear in orange within an explore. you can use to explore your data. To see their definitions, hover over an item, then select the “i” icon ().

Field categories in the Custom Events Explore:

| Category                   | Description                                                                                                                                                                                                                                                                                                                                               |
|----------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| Attributes Current         | Get Attribute values associated with the channels at the time the report is run.                                                                                                                                                                                                                                                                          |
| Attributes Relative        | Get Attribute values associated with the channels at the time the filtered Custom Event occurred.                                                                                                                                                                                                                                                         |
|                            |                                                                                                                                                                                                                                                                                                                                                           |
| Custom Event Properties    | Set Custom Event property parameters for the query.                                                                                                                                                                                                                                                                                                       |
| Custom Events              | Set Custom Event parameters for the query.                                                                                                                                                                                                                                                                                                                |
| Device Properties Current  | Get device property values associated with the channels at the time the report is run.                                                                                                                                                                                                                                                                    |
| Device Properties Relative | Get device property values associated with the channels at the time the filtered Custom Event occurred.                                                                                                                                                                                                                                                   |
| In-App Automation          | Get configuration details about [In-App AutomationsMessages cached on users’ devices and displayed when users meet certain conditions within your app, such as viewing a particular screen or opening the app a certain number of times.](/docs/guides/features/messaging/in-app-automation/), such as priority, dates, and display type (layout/format). |
| Message Content            | Get the Message text and additional details, such as notification ID and title, about the message to which the Custom Event is attributed.                                                                                                                                                                                                                |
| Query Parameters           | Target all or specific projects, and specify dates and response windows, where relevant.                                                                                                                                                                                                                                                                  |
| Tags Current               | Get Tag values associated with the channels at the time the report is run.                                                                                                                                                                                                                                                                                |
| Tags Relative              | Get Tag values associated with the channels at the time the filtered Custom Event occurred.                                                                                                                                                                                                                                                               |
| User Detail                | Get information about the channel that performed the filtered event.                                                                                                                                                                                                                                                                                      |
| User Detail - Derived      | Get historical information about the channel that performed the filtered event.                                                                                                                                                                                                                                                                           |

### Default filters

Use filters to reduce the number of records scanned and results returned. Each Explore includes filters that cannot be removed from the query.

The filter name, [field category](#field-categories), and usage information for the default filters in the Custom Events Explore:

Filter name Field category Use the filter to... 

Current Project Only Query Parameters Determine which projects are included in the query. Default selection: **Yes**. To include other projects within your company, select **No**, then:

1. In the sidebar, select **Query Parameters**.
2. Under **Dimensions**, select the filter icon () next to **Project name**.
3. In the Filters section, select the entry field next to the Project Name filter and choose which projects to include.

Date Range Query Parameters Target events that occurred on a specific date or within a specific date range.

## Building custom queries

The following sections walk you through using the Custom Events Explore to create custom queries that answer:

- How do I get a list of channels that performed a specific event over the past seven days?
- How do I determine what time of day users most frequently perform a specific event?

### Get a list of channels

Follow these steps to get a list of channels that performed a specific Custom Event over the past seven days.

First, [open the Custom Events explore](#navigation), and then configure your query:

1. Set up the filters:
   
   1. Leave **Current Project Only** set to `is Yes`.
   2. Leave **Date Range** set to `is in the last 7 complete days`.
   3. Select **Add Filter** and select **Custom Events**, then **Custom Event Name**, and enter your event name, for example, `item_purchase`. Only events that occurred within the past 90 days are available.
2. In the sidebar, specify the values and measures to display:
   
   1. Select **User Detail**, then select the Dimension **Channel ID**.
   2. Select **Custom Events**, then select the Measure **Event Count**.

Now you are ready to get your data. Select **Run**, and you should see results similar to the below image. To save your custom query for later access, follow the steps in [Saving Performance Analytics queries](https://www.airship.com/docs/guides/reports/analytics/tasks-queries/saving-queries/).

[![Custom queries and reference for the Custom Events Explore](/docs/images/explore-custom-events-channels_hu_2369c97cc406f790.webp "Custom queries and reference for the Custom Events Explore")](/docs/images/explore-custom-events-channels_hu_2369c97cc406f790.webp)

Creating a custom query from the Custom Events Explore

### Find peak engagement times

Follow these steps to identify the times of day when a Custom Event is most frequently performed. This information can help determine the most relevant time of day to send your campaigns.

First, [open the Custom Events explore](#navigation), and then configure your query:

1. Set up the filters:
   
   1. Leave **Current Project Only** set to `is Yes`.
   2. Set **Date Range** to `is in the last 90 complete days`.
   3. Select **Add Filter** and select **Custom Events**, then **Custom Event Name**, and enter your event name, for example, `order_completed`. Only events that occurred within the past 90 days are available.
2. In the sidebar, specify the values and measures to display:
   
   1. Select **Custom Events**, then select **Custom Event Date** and choose **Hour of Day**.
   2. Select **Custom Events**, then select the Measure **Event Count**.

Now you are ready to get your data. Select **Run**, and you should see results similar to the image below.

[![Custom queries and reference for the Custom Events Explore](/docs/images/explore-custom-events_hu_9fb496c603e6355d.webp "Custom queries and reference for the Custom Events Explore")](/docs/images/explore-custom-events_hu_9fb496c603e6355d.webp)

Creating a custom query from the Custom Events Explore

Next, select the down arrow icon () next to **Visualization** and select the column icon (). Use this format to identify the times of day when users are most engaged.

You can also add a reference line to make your report clearer. In the Visualization bar, select **Edit**, then **Y**, then **Add Reference Line**.

[![Custom queries and reference for the Custom Events Explore](/docs/images/explore-custom-events-columns_hu_9af96862a7c32565.webp "Custom queries and reference for the Custom Events Explore")](/docs/images/explore-custom-events-columns_hu_9af96862a7c32565.webp)

The column visualization of a custom query from the Custom Events Explore

To save your custom query for later access, follow the steps in [Saving Performance Analytics queries](https://www.airship.com/docs/guides/reports/analytics/tasks-queries/saving-queries/).