This article is about Google Analytics 4 properties. Refer to the Universal Analytics section if you're still using a Universal Analytics property, which will stop processing data on July 1, 2023 (July 1, 2024 for Analytics 360 properties).

[GA4] Modify and create events via the user interface

Change events and create new events based on existing events without changing site or app code

You can create and modify events in two ways:

  • In code, using Google Tag Manager or APIs such as gtag.js or Firebase
  • In configuration, using Analytics Configure > Events options

This article describes how to modify and create events in Analytics configuration. All events created in Analytics are based on existing website and app events. Common reasons for modifying and creating events  include:

  • Simplifying reports by using the same event name across properties and data streams
  • Fixing a measurement error caused by a typo in an event's name, conditions, or parameters
  • Creating a new event (based on an existing event) and trigger it on specific conditions
  • Narrowing the scope of an event and mark it as a conversion
Before you create or modify an event in the Google Analytics interface, make sure the event doesn't already exist in your website code or Google Tag Manager container. If you create an event that already exists, you will overcount the number of times the event was triggered.
You need the Editor role to modify and create events in Analytics.
In this article:

Event configuration options

The Configure > Events page in Analytics provides options to work with existing events, which include the automatically collected, enhanced measurement, and recommended events provided by Analytics, and any custom events created by someone in your organization or by a third-party. 

Event modification and creation differ as follows:

  • Modify event overwrites an existing event. You can add, change, or delete conditions and parameters.
  • Create event creates a new event from an existing event. You can copy the existing event's parameters and add new conditions and parameters. You can also edit events created in Analytics from existing events, but you do that from the Create event flow, not the Modify event flow. The Modify an event created in analytics section describes how.
Be cautious about modifying events provided by others because it could result in unintended consequences. For example, if you modify the Google-provided  page_view event to narrow its scope to a particular page, it will no longer collect data from any other pages. If you instead create a new event based on the page_view event, the original event remains unchanged.

To modify or create an event, specify:

  • Matching conditions, which include the existing event name and the conditions that will trigger the event. For example, you might want to capture a scrolling event that occurs on a particular web page. In this case, the name of the page would be a matching condition.
  • Parameter configuration, which include parameters that Analytics sends automatically and custom parameters that have been added in code or in Analytics. See Set up event parameters for more information.

The Configure > Events and Configure > Conversions pages also provide controls to mark new and existing events as conversions. See Set up and manage conversion events for step-by-step instructions on working with conversions.

Limitations

Events configured in Analytics have the following limitations:

  • Modified and created events do not apply to historical data.
  • You can modify up to 50 existing events and create up to 50 events based on existing events.
  • An hour or more passes before modifications take effect.
  • Modifications are executed client side before data is sent to Analytics for processing.
  • Modified events execute in the order they appear in the Event modifications list.
  • Modified events are processed before created events are processed.
  • You can't reorder created events.
  • You can't create and modify custom events based on parameters from the items array (e.g., item_branditem_nameitem_id) when you use gtag.js.

Watch a video

The following videos demonstrate how to create and modify events in Analytics.

The left navigation in Google Analytics has been updated since these videos were created. Follow the steps described on this page  instead.

Create Events in Google Analytics 4 properties

 

Edit Events in Google Analytics 4 properties

How to see video captions in your language

The videos above are in English. However, you can use auto captions to translate into your language:

  1. Begin playing the video.
  2. To turn on closed captions, click [CC].
  3. Click  SettingsSettings.
  4. Click Subtitles, then click Auto-translate.
  5. Select your language.

Create an event

One reason to create a new event from an existing event is to narrow its scope. For example, website visitors trigger the page_view event when they view any page. You might want to track the visitors who view a specific page separately by creating a new event from the page_view event and firing it when a visitor views that page.

To create an event in Analytics, first determine which existing event to base it on. Find out what parameters the existing event uses. Finally, choose the conditions that should trigger the new event and decide whether to add parameters to capture additional data. 

Tip: To find the parameters for Google provided events, see the event documentation. For parameters associated with events created by you or someone in your organization, navigate to the Realtime report. In the Event count by Event name table, click an event to view its details. The EVENT PARAMETER KEY column lists all parameters for that event.

Event naming rules

To choose a name for your new event, follow these rules:

  • Event names are case sensitive. For example, my_event and My_Event are two distinct events.
  • Event names must start with a letter. Use only letters, numbers, and underscores. Don't use spaces.
  • Event names can include English and non-English words and letters.
  • Do not use reserved prefixes and event names:

    Reserved prefixes and event names
    This list is not exhaustive and may be updated periodically. If you try to use a reserved prefix or name, Analytics will display an error message.

    Web

    Prefixes

    • _ (underscore)
    • firebase_
    • ga_
    • google_
    • gtag.

    Event names

    • app_remove
    • app_store_refund
    • app_store_subscription_cancel
    • app_store_subscription_convert
    • app_store_subscription_renew
    • first_open
    • first_visit
    • in_app_purchase
    • session_start
    • user_engagement

    Mobile (Android and iOS)

    Prefixes

    • _ (underscore)
    • firebase_
    • ga_
    • google_
    • gtag.

    Event names

    • ad_activeview
    • ad_click
    • ad_exposure
    • ad_query
    • ad_reward
    • adunit_exposure
    • app_background
    • app_clear_data
    • app_exception
    • app_remove
    • app_store_refund
    • app_store_subscription_cancel
    • app_store_subscription_convert
    • app_store_subscription_renew
    • app_update
    • app_upgrade
    • dynamic_link_app_open
    • dynamic_link_app_update
    • dynamic_link_first_open
    • error
    • firebase_in_app_message_action
    • firebase_in_app_message_dismiss
    • firebase_in_app_message_impression
    • first_open
    • first_visit
    • in_app_purchase
    • notification_dismiss
    • notification_foreground
    • notification_open
    • notification_receive
    • notification_send
    • os_update
    • session_start
    • session_start_with_rollout
    • user_engagement

Steps to create an event

To create an event from an existing event:

  1. In the left pane, click Configure and select Events.
  2. Click Create event.
  3. If your property has more than one data stream, you will be asked to select a data stream.
  4. Click Create.
  5. For Custom event name, enter a name for the new event that conforms to Event naming rules.
  6. In the Matching conditions Value field, enter the name of the existing event that this event will be based on.
  7. Click Add condition to specify what will trigger the new event.
  8. Select the Copy parameters from the source event checkbox to use the same parameters as the original event. For example, if you want your new event to be triggered when a page_view event is sent, and you want your new event to have the same parameters as page_view, select this checkbox.
  9. If you are copying parameters from the source event, specify any changes you want to make to the parameter values. For example, if your new event is triggered whenever a page_view event is sent with page_title of "Confirmation", and you want the new event to substitute a different value for page_title, specify that change here.

The Examples section illustrates how to specify Matching conditions and Parameter configuration for common use cases.

Modify an event

Modifying an existing event overwrites that event. Use caution when modifying an event someone else provided. Before modifying an event, determine which parameters the existing event uses and decide how you want to modify the event.

Tip: To find the parameters for Google provided events, see the event documentation. For parameters associated with events created by you or someone in your organization, navigate to the Realtime report. In the Event count by Event name table, click an event to view its details. The EVENT PARAMETER KEY column lists all parameters for that event.
The following sections describe how to:

Modification steps

Follow these steps to modify an existing event:
  1. In the left pane, click Configure and choose Events.
  2. Click Modify event.
  3. If your property has more than one data stream, you will be asked to select a data stream.
  4. Click Create.
  5. For Modification name, enter a unique description of the change you are making, such as "Rename pub_article to publish_article".
    The Modification name will appear in your list of event modifications, so provide descriptive text. For example, you might need to reorder the sequence of modified events; the name can include which event the modified event depends on to make it easier to reorder them.
  6. For the Matching conditions Value field, enter the name of the existing event to modify.
  7. To enter additional conditions to trigger the modified event, click Add condition.
  8. Under Modify parameters, specify what change should be made. For example, the following specifies that event name should be changed to "publish_article". More examples
    Modify parameters
    Parameter New value
    event_name publish_article
  9. Click Save.
Modifications don't apply to historical data. It may take some time after saving the modification before it begins to take effect on new data you collect. See additional limitations.

Reorder event modifications

Event modifications are applied to your data in the order they appear in the modifications list. This order can be important if you have modifications that rely on each other.

For example, if you rename an event in Modification 1 and use that new name as the basis for creating another event in Modification 2, then you need the modifications to execute in the order of Modification 1 > Modification 2. If those modifications are listed out of order, then Modification 2 will fail.

To reorder event modifications:

  1. In the left pane, click Configure, then Events.
  2. Click Modify Event.
  3. If your property has more than one data stream, you will be asked to select a data stream.
  4. In the Event modifications pane, click Reorder.
  5. Drag a modification from one position in the list to another as needed.
  6. Click Apply.

Modify an event created in Analytics

To modify an event created in Analytics, follow these steps:
  1. In the left pane, click Configure and choose Events.
  2. Click Create.
  3. From the Custom events table, select the event to modify.
  4. Roll your cursor over the Configuration pane and click the edit icon.
  5. Adjust the conditions and parameters as needed.
  6. Click Save.

Examples

Rename an existing event

 The example below shows how to rename pub_article to publish_article. For all data collected after this change,  publish_article will appear in reports instead of pub_article.

If you rename an event that is already marked as a conversion, that event will no longer be a conversion. If you modify event parameters but do not change the name, the event remains a conversion.

Modify event

Modification name

Change pub_article to publish_article

Matching conditions
Parameter Operator Value
event_name equals pub_article

Modify parameters
Parameter New value
event_name publish_article

Create an event from an existing event

Create a new event when you need to trigger an event based on conditions, but you don't want any existing events to change. 

For example, suppose the existing article_scroll event is triggered when a visitor scrolls to read a complete article on a website. To have separate reporting on scrolls of the product page (product.html), you could create a new product_scroll event. Both article_scroll and product_scroll will appear in reports, for all data collected after the new event triggers.

Create event

Custom event name

product_scroll

Matching conditions
Parameter Operator Value
event_name equals article_scroll
page_location Contains (Ignore case) product

Trigger an event based on a value

Identify the existing event or parameter you want to use as the trigger for your new event. 

Let's say you want to create a custom event called "large_purchase" whenever a purchase event is sent with a value of $100 or more.

  1. Enter "large_purchase" as the Custom event name.
  2. Enter the matching conditions.
  3. Copy the original event's parameters to the new event.

Custom event name

large_purchase

Matching conditions
Parameter Operator Value
event_name equals purchase
value greater than or equal to 100

Parameter configuration

 Copy parameters from the source event

In this example, the original purchase event remains, and your new "large_purchase" event is also logged when the value of the purchase event is greater than or equal to 100.

Modify parameters

Open an event as described in Modification steps or Modify an event created in Analytics to change, copy, or remove event parameter values:

Change a parameter value

To change an event parameter value, select the parameter in the Parameter field, then enter the value you want to use in the New value field. For example, to change the value of level_name to "Scary dungeon", select the level_name parameter, then enter the new value:

Modify parameters
Parameter New value
level_name Scary dungeon

Copy a parameter value

You can replace one parameter's value with another parameter's value. To do this, enter the other parameter's name enclosed in double brackets in the New value field.

Modify parameters
Parameter New value
level_name [[other_parameter]]

For example, suppose you find a typo in a parameter name: instead of level_name, an event was implemented with a lvl_name parameter. You can fix this by first copying the misspelled parameter to the correct parameter. 

Modify parameters
Parameter New value
level_name

[[lvl_name]]

Note: To use this feature, don't add text outside of the square brackets (for example, "[[lvl_name]] other text" won't work).

Remove an event parameter

You can delete parameters you don't need or want. To do this, set the parameter value to blank.

Modify parameters
Parameter New value
lvl_name  
Was this helpful?
How can we improve it?

Need more help?

Sign in for additional support options to quickly solve your issue

Search
Clear search
Close search
Google apps
Main menu
Search Help Center
true
true
true
69256
false
false