On this page

Fix your data with transformations

Amplitude Data's transformations feature lets you transform event data to correct common implementation mistakes. Transformations are retroactive: you can create them whenever you want and apply them to all historical data. You can change your event data without touching your underlying code base. No matter when you recognize a mistake or want to make a change, you can use a transformation to correct all affected data, both historically and moving forward.

Transformations on Amplitude's default user properties aren't supported.

You can apply transformations only in a project's main branch. Ensure the Show transformations toggle is set to ON.

Transformations occur at query time when a chart or cohort generates results. This doesn't affect the raw data. Transformations don't affect raw data on Snowflake or Redshift.

Merge events, event properties, and user properties

Many Amplitude users need to merge superfluous or duplicate events, event properties, or user properties. Transformations make this process easy.

Merge events

This transformation lets you merge events together. Use it if you're tracking two or more events that you want to track as one single event instead. For example, you can merge the events comment_reply_like and comment_share into a single event, comment.

When merging events, you can also add a property that helps distinguish between the two original events after you merge them. This transformation can help if you're logging data into two events with similar syntax when you could log this information as one event with different property values instead. For example, you could transform the events comment_reply_like and comment_share into one event, comment. The event comment then has a new event property comment type with values reply like and share.

To merge events, follow these steps:

  1. In Amplitude Data, navigate to Events.

  2. Find the events you want to merge together and click the checkbox next to their names.

  3. After you've selected the events, the Transform option appears in the menu bar above the events list. Click Transform.

  4. Choose whether you want to merge the events you selected into a single event, or into a single event with an extra distinguishing property. Then click Next.

  5. Use the dropdown in the Transform & Merge Events modal to tell Amplitude Data whether you want to merge the selected events into a new event, or whether you want to merge them into a different, already existing event. If you're merging into a new event, name it here. Then click Preview.

  6. In step 5, if you aren't adding the extra distinguishing property to your merged event, skip to step 9.

Otherwise, select the event property you want to use as a differentiator from the Select Property dropdown. Then click Next.

  1. Next, map the events you selected with new values for the property you selected. Enter the new value in the Property Value… field and click Preview.
  2. Review your changes and click Merge to complete the transformation.

Merge event properties or user properties

This transformation lets you merge properties, either for events or for users. Use it if you have two properties that track the same information but use different naming syntax.

For example, imagine an event property is called title in some cases, and in others, it's called TITLE, but they represent the same thing on all events. You can clean things up by transforming title and TITLE into Title, combining the data.

Similarly, a user property called name in some cases and NAME in others, even though they represent the same thing for all users, could be unclear. Transforming name and NAME into Name is a good way to resolve any potential confusion.

You can merge event properties only with other event properties, and user properties only with other user properties.

To merge event properties or user properties, follow these steps:

  1. In Amplitude Data, navigate to Properties, then click either the Event or User tab, depending on which type of properties you want to merge.
  2. Find the properties you want to merge together and click the checkbox next to their names. After you've selected the event properties, the Transform option appears in the menu.
  3. From the Transform dropdown, select Merge Property.
  4. The Merge Properties modal appears. Type a new event property name or type the name of the event property you want to merge the selected event properties into. Click Next.
  5. Review your changes and click Merge to complete the transformation.

Rename property values

This transformation lets you reassign event and user property values. Use this transformation if a property has misspellings or nonsensical values in dropdowns. It lets you hide them from the UI or turn them into another value.

For example, you can reassign the values of true and TRUE to True.

To rename a property value, follow these steps:

  1. Navigate to Properties and open either the Event or User tab, depending on the type of property you want to rename.
  2. Find the property with the property value you want to rename and click the checkbox next to its name.
  3. From the Transform dropdown, select Rename Value.
  4. The Edit Renamed Values modal appears. Under Current Property Value, click Select value(s)....
  5. From the list, select the value you want to rename and click Apply.
  6. Under Derived Value, click Select value... to set a new value.
  7. Click New Value and enter the new value in the field that appears.
  8. Repeat steps 4 through 7 for every value you want to rename. Then click Next.
  9. A confirmation modal appears. Click Rename.

Hide property values

Setting a property value's visibility status to hidden is helpful for values you want to track but don't want to appear on the dashboard in any charts. Hiding a property value doesn't delete its raw data, and the value is still visible in the user's individual event stream.

To hide a property value, follow these steps:

  1. Find the event or user property with the value you want to hide. Check the box next to its name.
  2. From the Transform dropdown, select Hide Values.
  3. Select the value or values you want to hide from Amplitude and click Next.
  4. A confirmation modal appears. Click Hide.

Edit and delete transformations

Transformations aren't permanent. You can reverse them, and you can edit or delete them at any time.

To edit your transformation, follow these steps:

  1. Find the transformed event, event property, or user property you're interested in.
  2. Click the transformation's name to open the details panel. Click Transformed Values to see the transformations tab.
  3. Click Edit next to the transformation you want to edit, make the necessary changes, and save.

To delete your transformation, follow these steps:

  1. Find the transformed event, event property, or user property you're interested in.
  2. Click the checkbox next to the transformation you want to delete.
  3. Click Undo Transformation.
  4. A confirmation modal appears. Click Undo Transformation.

Deleting a transformation doesn't delete the original events.

Use transformed properties for targeting

Transformed user properties are available as targeting criteria in Experiment, Feature Flags, and Guides & Surveys. At evaluation time, Amplitude applies your project's transformation configuration before evaluating targeting rules, so the same merge and rename rules that clean up your Analytics data also govern who gets targeted and exposed.

You don't need to reimplement transformation logic in your SDK or backend. Define the rules once in Amplitude Data and they apply consistently across Analytics, Experiment, Feature Flags, and Guides & Surveys.

For more details, refer to Remote evaluation and Setup and targeting.

Transformed events and custom events

Common questions

I merged event A and event B together to create event C. What happens to saved charts that were querying on event A?

Any saved chart querying on event A continues to do so after the merge. The chart doesn't automatically switch from event A to event C. For charts created after the merge, neither event A nor event B appears in the chart dropdown; only event C appears.

I merged event A and event B together to create event C. How do I bulk update the existing saved charts to now use event C?

You can't bulk update charts in Amplitude. Try adding all charts that still use the old events (in this example, events A and B) to a dashboard. Use Find & Replace to swap those events for event C, then click Save onto Charts > Update existing charts.

I merged event property A and event property B together to create event property C. What happens to saved charts that were querying on event property A and event property B?

Saved charts don't automatically switch to a different event property after a transformation. Each chart keeps querying the property you saved with it until you edit the chart.

After the transformation, chart dropdowns only show the merged or target property. You can't create new charts that still query the old, untransformed property names.

How you update existing charts depends on how you merged properties:

  • You merged into a new event property C: Update every saved chart that still queries event property A or B. For example, edit each chart and select event property C in the chart controls. You can also add those charts to a dashboard, use Find & Replace to swap the old properties for property C, then click Save onto Charts > Update existing charts.
  • You merged into an existing event property (for example, you map both A and B into property A instead of creating a new name): Update any saved chart that still queries a source property you dropped. Charts that already query the target property don't need changes, because they already use the merged property.

I want to unmerge event C. What happens to the charts that use this merged event?

The result depends on how you created event C in the first place.

  • If you merged event A and event B into event C: after refresh, the chart's user/event totals drop to zero.
  • If you merged event A and event C into event C: after refresh, the chart queries the source event C.

Can I create a new transformation from an existing transformation?

Amplitude doesn't support transformations on transformations. To request this capability, submit a feature request.

Event C is a merged event composed of source events A and B. Can I view event A and event B separately, then event C starting at the date of the transformation?

Transformations apply retroactively, so that isn't possible.

Which value takes priority in a property merge?

Use this example: for one instance of event A, you send the event property event prop = true; for another instance of event A, you send the event property event_property = false. You then merge both event properties into EVENT_PROPERTY.

When you query on event A and group by EVENT_PROPERTY, this user appears twice. You see one data point for the true value and one for false.

Was this helpful?