[GA4] Modify and create events

This article is for website and/or app owners who want to change the names of events they collect, or create new events based on existing events, in order to improve the usefulness of their reports.
In this article:

You can modify the events you collect, and create custom events based on other events triggered by your users, without changing the code in your Google Analytics 4 implementations. Modifying and creating custom events can help improve the quality and consistency of your data by applying common, more structured event names and parameters.

This article is not about implementing events via the gtag.js library. Instead, this article describes how you can easily make minor changes to the events you're already collecting, such as:

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

See also: Implement events using Google Tag Manager 

For example, if you collect the same event from the Android and iOS versions of your app but under different names, you can edit those events to use the same name and thereby simplify your reporting. Another example: you can rename parameters to conform to the schema Analytics uses for suggested events (for example, Retail, Jobs, Travel, Games).

You can also modify the parameters of a particular event in response to other events triggered by your users. For example, you might want to add a parameter noting a discounted item price based on a particular promotion_name.

Custom events let you create new events in response to other events. For example, you can define a new_purchase event when the page_view event is triggered with a page_title parameter of "Checkout". You can mark the new purchase event as a conversion and see it appear in your Conversions reports.

Modify an event

You need Edit permission to modify and create events.
  1. Sign in to Analytics.
  2. Select your property.
  3. In the left pane, click All 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 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 "purchase" event to "large_purchase" for orders over a certain amount:

Matching conditions

Parameter

Operator

New value

event_name

equals

purchase

value

is greater than

100

Modify parameters

Parameter

New value

event_name

large_purchase

The new name 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 a custom event

To create a custom event:

  1. Sign in to Analytics.
  2. Select the relevant property.
  3. In the left pane, click All 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 All 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 you want as the trigger for your new event. For example:

Matching conditions

Parameter

Operator

New value

page_title

equals

Check Out

Modify parameters

Parameter

New value

event_name

large_purchase

In this example, when any event containing the page_title parameter fires, if the value of that parameter is "Check Out", then your new custom event is triggered.

You can create custom events that are triggered based on multiple conditions, all of which must match in order for your event to be triggered.

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

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 All 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.
Was this helpful?
How can we improve it?