[GA4] Event modifications and custom events

Edit existing events and create custom events based on other events you're collecting.
This article is for website owners who want to make changes based on events that are already being collected, such as automatically collected events, enhanced measurement events, or recommended events you've implemented via the gtag.js library or using Google Tag Manager

Event modifications let you add, remove, or change event parameters and values. Custom events let you create new events based on other events you're already collecting. Event modifications and custom events can help you improve the usefulness of your reports by fixing errors in your data collection, standardizing events and parameters, and customizing your implementation, without coding.

You need Edit permission to modify and create events.
Currently, you can modify and create web events. Modifying and creating custom app events is coming soon.
In this article:

Definitions

Modify an event

Modifying an event lets you adjust the details of an event you collect. For example, you can

  • Rename events to standardize and unify your reporting across different properties and data streams.
  • Fix typos that are causing measurement errors.
  • Fine tune events by changing event parameters when one or more other events meet conditions you specify.

Examples

If you measure multiple web data streams that use different names for the same event, you can standardize the event in order to simplify your reporting. For example, say website A calls a purchase a "sale," while website B calls a purchase a "transaction." You can edit the events and standardize on "purchase."

If your site implemented recommended events (for example, Retail, Jobs, Travel, Games), you can rename your parameters to conform to the schema Analytics uses.

If you wanted to add a parameter noting a discounted item price based on a particular promotion_name, you could add or modify the parameters of a purchase event when that event contains the promotion in question.

When you modify an event, the original event is overwritten with the new values you specify.

Create a custom event

Creating a custom event lets you build new events based on other  events or parameters you're already collecting.

Example

You can define a new_purchase event when the page_view event is triggered with a page_title parameter of "Checkout".

When you create an event, the original event remains, and the new event is added to your data.

Mark as conversion

Marking an event as a conversion causes it to appear in your conversion reports.

Modify an event

Edit Events in Google Analytics 4 properties

  1. Sign in to Analytics.
  2. Select your property.
  3. In the left pane, click Events.
  4. At the top, click Modify Event.
  5. Select an existing modification or click Create to create a new modification.
  6. Configure the event modification options (see below).
  7. Click Create.
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 below for additional limits.

Modification name

Enter a name for the modification. You can use letters, numbers, and punctuation. Modification names must be unique.

Matching conditions

Specify the conditions that must be met to apply this modification. For example, say you want to change the page_title parameter value from "Thank you" to a different value:

Matching conditions

Parameter

Operator

New value

page_title

equals

Thank you

In this example, when any event containing the page_title parameter is triggered, if the value of that parameter is "Thank you", then your modification is applied.

You can add multiple conditions to the modification, all of which must match in order for your modification to be applied.

  • To add another condition, click Add condition.
  • To remove a condition, on the right, click Remove..

Modify parameters

Specify the changes you want to make. Here's what you can change:

Change a parameter value

To change an event parameter to a specific 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 page_title to "Checkout", select the page_title parameter, then enter the new value:

Modify parameters

Parameter

New value

page_title

Check Out

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

page_title

[[other_parameter]]

Example

Suppose you find a typo in a parameter name: instead of page_title, an event was implemented with a page_tittle parameter (one too many tees). You can fix this by first copying the misspelled parameter to the correct parameter. You can then delete the misspelled parameter by setting its value to blank.

Modify parameters

Parameter

New value

page_title

[[page_tittle]]

page_tittle  

Rename an event

To change an event's name, in the Parameter field, select event_name, and enter the new name in the New Value field. For example, you can rename a "buy" event to "purchase".

Matching conditions

Parameter

Operator

Value

event_name

equals

buy

Modify parameters

Parameter

New value

event_name

purchase

Here's another example: say you want to rename the "purchase" event to "large_purchase" for orders over a certain amount. To do this, add another matching condition based on the value parameter of the "purchase" event.

Matching conditions

Parameter

Operator

New value

event_name

equals

purchase

value

is greater than or equal to

100

Modify parameters

Parameter

New value

event_name

large_purchase

In this example, the original "purchase" event is overwritten by the new "large_purchase" event when the value is greater than or equal to 100. If the value is less than 100, the original "purchase" event is logged. Both events could appear simultaneously if they were triggered during the timeframe of your report and analysis.

Notes:

New event names must conform to the event naming rules described below.

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.

You can change multiple parameters at once.

  • To change another parameter, click Add modification.
  • To remove a condition, on the right, click Remove..

Create or edit a custom event

Create Events in Google Analytics 4 properties

Custom events are events that result when another event is triggered. To create a custom event:

  1. Sign in to Analytics.
  2. Select the relevant property.
  3. In the left pane, click Events.
  4. Click Create Event.
  5. Select an existing custom event or click Create to create a new one.
  6. Configure the custom event options (see below).
  7. Click Create.
In addition to accessing these options from the Events page, you can also access them from Admin > Property column > Data Streams > Web > web stream > Tagging Settings.

Custom event name

Event names are case sensitive. For example, my_event and My_Event are two distinct events. Use only letters, numbers, and underscores. Don't use spaces. Names must start with a letter.

You can't use reserved prefixes and event names for custom events. See the list below.

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

Matching conditions

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

Let's return to the previous "large_purchase" example. To create a new custom event, instead of modifying the original "purchase" event, do the following:

  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.

Notes:

New event names must conform to the event naming rules.

You can mark the new event as a conversion. See below.

Parameter configuration

To copy parameters from the triggering event to the new event, select Copy parameters from the source event.

To modify the copied parameters or add new ones, click Add modification. You can do the same things here as you can when creating an event modification.

Mark events as conversions

You can mark any event, including custom events you create, as conversions. For custom events, you should do this right after creating the new event to begin collecting data as soon as possible.

  1. Sign in to Analytics.
  2. In the left pane, click Conversions.
  3. Click New conversion event.
  4. Under New event name, enter the name of the new event you created (be sure to enter the name exactly as configured during the creation process).
  5. Click Save.

Learn more about conversions.

Reorder the list of 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. Sign in to Analytics.
  2. Select the relevant property.
  3. In the left pane, click Events.
  4. Click Modify Event.
  5. In the list of Event modifications, click Reorder.
  6. Drag a modification from one position in the list to another as needed.
  7. Click Apply.

Limits of event modifications and custom events

  • Modifications and custom events don't apply to historical data.
  • You can create up to 50 modifications to existing events and up to 50 custom events.
  • Modifications require time (generally minutes but possibly longer) before taking effect.
  • Modifications are executed client side before data is sent to Analytics for processing.
  • Modifications execute in the order they appear in the Event modifications list.
  • Modifications are processed before any custom events are processed.
  • You can't reorder custom events.
Was this helpful?
How can we improve it?