[GA4] Tutorial: Set up a key event

Learn to measure a key event when someone visits a confirmation page on your website (formerly known as URL destination "goals")

This tutorial explains how to measure a key event, like a user visiting a confirmation page, and analyze the key event data in Google Analytics to enhance your site. For more details on key events, read About key events.

Overview

When someone views a page on your site, a page_view event is sent to Google Analytics and measures all pageviews. You wouldn't mark the event as a key event because doing so would mark all pageviews as key events.

Instead, set up a different event that's based on the page_view event that measures when someone views the page on your site. This tutorial describes how to measure when someone views a confirmation page for the URL http://www.examplestore.com/contact-us-submitted.

Before you begin

You must be an administrator or editor to set up key events.

Set up the key event

Step 1: Create an event for the confirmation page

To measure a key event when someone views a confirmation page, create a separate event using the page_view event. In this case, you can use the generate_lead event. You should use recommended events like the generate_lead event whenever possible, instead of custom events, to take advantage of prebuilt Google Analytics features.

  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 a Viewer or above at the property level to create an event.
  2. Click Create event, then click Create.
  3. In the Custom event name field, enter the event name "generate_lead".
  4. In the Matching conditions section, enter the condition "event_name equals page_view".
  5. Click Add condition.
  6. Enter the condition "page_location equals https://www.example.com/contact-us-submitted".
  7. In the Parameter configuration section, click Add modification twice. Because you are using a recommended event, you need to define each of the required parameters. Otherwise, we treat the event as a custom event.
  8. In the first row, enter parameter "value" and value "100" to define the value of the lead.
  9. In the second row, enter parameter "currency" and value "USD."
  10. Click Create.

Step 2: Mark the event as a key event

Analytics hasn't received the new event yet, so you need to preemptively mark the event as a key event.

  1. In Admin, under Data display, click Key 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 a Marketer or above at the property level to create new key events.
  2. Click New key event.
  3. Enter the name of the new event, "generate_lead".

Verify the key event

When you mark an event as a key event, it can take some time (from a few minutes up to a few hours) for the configuration to apply to the event.

After your configuration is applied to the event, visit your site's confirmation page. Then, check the Realtime report's Key events by Event name card for "generate_lead" to confirm if Analytics is treating it as a key event.

Report on key events

Key event counts

If you're an editor or administrator, the quickest way to see your key events is to visit the Key events page in Admin. The page includes a table with each of your key events, the number of times users triggered each key event, and the value associated with the key event (if you associate a value with the key event).

On the Key events page, you can change the report date range in the top right and the key event counting method and default key event value to the right of each row.

User acquisition

Next, you can go into the User acquisition report and select "generate_lead" from the drop down under the Key events column. When you select the the key event from the menu, you will be able to see traffic source dimensions associated with a user's first session that generated the most key events.

Attribution

Finally, you can go into the Attribution paths report in Advertising. The report helps you understand your customers’ paths to key event and how different attribution models distribute credit on those paths.

Was this helpful?

How can we improve it?
Search
Clear search
Close search
Main menu
6494777140349566084
true
Search Help Center
true
true
true
true
true
69256
true
false