How to delete events in Google Analytics 4

A recent problem was posted in Measure Slack asking if it were possible to completely delete events from Google Analytics 4 (GA4). The good news is that while it isn’t immediately obvious, it is completely possible. Well, of sorts!

Within GA4 there is a feature called Data Deletion Requests (Admin > (Property) > Data Deletion Requests) in which are different ‘Deletion types’ that a user can now take advantage of. This means we can now be quite granular about what we do/don’t want to delete. This is a much welcome relief from the somewhat devastating data deletion feature that existed in Universal Analytics. The 5 deletion types are:

  1. Delete all parameters on all events
  2. Delete all registered parameters on selected events
  3. Delete selected parameters on all events
  4. Delete selected registered parameters on selected events
  5. Delete selected user properties
GA4 data deletion request types

From the above list it isn’t immediately obvious which deletion type you would need to use if you wanted to delete an event and all the associated parameters from your property. After some testing we found that you actually need to do this in two steps.

Step 1 – Delete all the event parameters

We first need to delete all of the parameters for the event(s) we want to delete. We can do by running a data deletion request and choosing the ‘Delete all registered parameters on selected events’. After choosing your event that you want to delete, and the selected time frame, you then need to schedule this data deletion request.

GA4 data deletion request all parameters on selected events screen

Step 2 – Delete the event name

Once the above data deletion has been processed, all that would be left in your property is the event name as it would no longer carry any parameters. So what we need to do is then delete the event from the property.

We do this by doing another data deletion request, only this time choose the ‘Delete selected parameters on all events’ option. Within the ‘Parameters to delete’ dropdown field search for ‘event_name’ and add this parameter. Finally, enable the option to ‘only delete parameter value that contain the following text’ and enter the name of your event that you want to delete i.e. ‘my_event_to_delete’ in our example, and then schedule the request.

GA4 data deletion request selected parameters on all events screen

Once the above two requests have processed, you’ll still be left with an event in your events reports called ‘(data deleted)’, and all associated parameter values will also appear as ‘(data deleted)’ too.

GA4 events report with (data deleted) event visible
GA4 events report with (data deleted) event visible including custom dimension with (data deleted) visible

Note: in our example above, we have the parameter ‘page_location’ set as an event-level Custom Dimension and thus it is deleted via this process. The standard out-of-the-box dimensions are not deleted, i.e. Page path

GA4 events report with (data deleted) event visible including page path dimension with actual un-deleted data visible

There’s not much else we can now, the ‘(data deleted)’ event will remain visible in the reports. However, you can of course manually filter these events out in any custom report, or dashboards you build in Google Dtaa Studio.

Happy deleting!

Share:
Written by

George is a Lead Analytics Consultant at Measurelab. He loves a complex problem to solve and is even restoring a classic car just to see how it works.

Subscribe to our newsletter: