[GA4] Rename and generate new events

Rename existing events and their parameters or generate new events, based on existing events

You may sometimes want to generate a new event whenever an existing event is triggered with specific parameter values. For example, if you want to register a key event whenever a user lands on a confirmation page, you can generate a new custom event called, for example, confirm_signup whenever the page_view event occurs with a page_location parameter value that matches your confirmation page URL. Then, you would mark the confirm_signup event as a key event.

You can also change an existing event, for example rename it or its parameters. This allows you to fix measurement errors caused by a typo in an event's name, conditions, or parameters.

Limits & caveats

  • Modified and new 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 calculated client side (before data is sent to Analytics).
  • You can't generate or modify events based on parameters from the items array (e.g., item_brand, item_name, item_id) when you use gtag.js.

  • You can't modify events if you send them in a server-to-server setup, for example, when you use Measurement Protocol.

Before you begin

Before you generate a new event or rename an existing event:

Instructions

If you have multiple streams connected to your Google Analytics property, you will be asked to choose which stream you want to create or modify your events in.

Generate an event from an existing event

Generating an event copies over an existing event into a new event with the parameters from the existing event plus any new parameters you specify.

  1. In Admin, under Data display, click Events.
    Note: The previous link opens to the last Analytics property you accessed. You can change the property using the property selector. You must be an Editor or above at the property level to generate an event from an existing event. If you don't see the Create event button in the top right of the table, then you don't have the required role to create events.
  2. Click Create event, then click Create.
  3. In Custom event name, enter an event name that conforms to the event naming rules.
  4. In Matching conditions, specify one or more matching conditions. Google Analytics will copy over any event that matches the conditions you specify. For example, if you specify "event_name equals view_item", Analytics will copy over view_item to your new event.
    To define a condition to be case sensitive, use one of the operators that does not include the text "(ignore case)". For example, use "equals" instead of "equals (ignore case)" if you want the parameter to exactly match the value.
    Before you use a regular expression in a matching condition, review the best practices.
  5. (Optional) By default, Copy parameters from the source event is enabled to use the parameters from the matching event. To turn off this feature, click Copy parameters from the source event.
  6. (Optional) In Modify parameters, change any of the parameters from the matching event that you've copied over to the new event. For example, if you specify the view_item event in matching conditions, then you could modify the currency parameter. Learn more
    Note: You cannot apply mathematical operations to events using the event builder. Instead, you need to send the updated value in a new event.
  7. Click Create.
Modify an existing event

Modifying an event overwrites an existing event by adding, changing, or removing parameters. Modified events are processed before created events are processed.

Warning: Be cautious about modifying events as 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. In this example, you should instead create a new event based on the page_view event so the original event remains unchanged.
  1. In Admin, under Data display, click Events.
    Note: The previous link opens to the last Analytics property you accessed. You can change the property using the property selector. You must be an Editor or above at the property level to modify an existing event. If you don't see the Modify event button in the top right of the table, then you don't have the required role to modify events.
  2. Click Modify event, then click Create.
  3. In Modification name, enter a name that describes the changes.
  4. In Matching conditions, specify one or more matching conditions. You will be able to modify the event that has one or more event parameter that match all the conditions you specify. For example, if you specify "event_name equals view_item", you will be able to modify the view_item event.
    To define a condition to be case sensitive, use one of the operators that does not include the text "(ignore case)". For example, use "equals" instead of "equals (ignore case)" if you want the parameter to exactly match the value.
    Before you use a regular expression in a matching condition, review the best practices.
  5. In Modify parameters, change any of the parameters from the matching event. Here are some examples of the modifications you can do.
    Note: You cannot apply mathematical operations to events using the event builder. Instead, you need to send the updated value in a new event.
  6. Click Create.

Modified events execute in the order they appear in the Event modifications list.

Reorder your modified events

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 Admin, under Data display, click Events.
    Note: The previous link opens to the last Analytics property you accessed. You can change the property using the property selector. You must be an Editor or above at the property level to reorder your modified events. If you don't see the Modify event button in the top right of the table, then you don't have the required role to modify events.
  2. Click Modify event.
  3. In the Event modifications pane, click Reorder.
  4. Drag a modification from one position in the list to another as needed.
  5. Click Apply.
Edit one of your generated or modified events
  1. In Admin, under Data display, click Events.
    Note: The previous link opens to the last Analytics property you accessed. You can change the property using the property selector. You must be an Editor or above at the property level to edit one of your generated or modified events. If you don't see the Create event button in the top right of the table, then you don't have the required role to create events.
  2. Click Create event.
  3. In the Custom events table, select the event to modify.
  4. Adjust the conditions and parameters as needed.
  5. Click Save.

Examples

Modify an existing event

The following example 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.

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

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

Generate a new event from an existing event

Generate a new event when you need to trigger an event based on conditions, but you don't want any existing events to change. Create a new event as described in the instructions on how to Generate a new event from an existing event.

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 generate 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 the instructions on how to modify an existing event:

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?
Search
Clear search
Close search
Main menu
12950064964134651403
true
Search Help Center
true
true
true
true
true
69256
true
false