Skip to main content

Custom GA4 Events

Custom events track specific visitor actions that standard GA4 doesn't capture automatically, like product list views, form submissions, or button clicks.

Prerequisites

You need access to both Google Tag Manager and GA4. Contact the Globber IT team if needed.

Theme dataLayer events

The Globber theme automatically pushes 9 ecommerce events, 3 popup events, and a newsletter opt-in event to the dataLayer — no custom code needed. See the GTM dataLayer Events Reference for the full list and payload structures.

Setting Up a Custom Event in GTM

This example sets up a view_item_list event to track product category page views. Once it's set up, you can view it at your Google Analytics dashboard.

Example View of View Item List Event

Information on Custom Evenets

Click here for more info on Google Analytics custom events.

Step 0: Create New Custom Trigger

Before you begin, you will have to create a custom trigger.

  1. Go to tagmanager.google.com and sign in
  2. Select your website container
  3. Navigate to TriggersNew

Select New Triggers

  1. Click Trigger Configuration Box Trigger Config Box

  2. Go to the bottom and select Custom Event Custom Event Setup

  3. Name the Custom Event as Event - view_item_list and label it as view_item_list under Event name. It's important to use lower-case under event names since GA4 is case-sensitive.

Trigger Setup

  1. Ensure the trigger fires on All Custom Events and hit Save when you're done.\

Step 1: Create a New Tag

  1. Go to tagmanager.google.com and sign in
  2. Select your website container
  3. Click TagsNew

Click New Tags

  1. Click the tag configuration area

Click Tag Configuration

  1. Select Google Analytics and Google Analytics: GA4 Event

Select Google Analytics

Select GA4 Event

  1. Name your tag (e.g., "Event - View Item List") and input your Measurement ID. Under "event name", label it as view_item_list. You will have to use lower-case since GA4 is case-sensitive.

Afterwards, enable Send Ecommerce data via Data Layer data source.

GA Tag Option

note

Use lowercase with underscores. GA4 is case-sensitive.

Step 2: Set Up the Trigger

  1. Follow-up to Step 1, click the Triggering section

Select Triggering

  1. Select the custom trigger you created in Step 0.

Choose Custom Trigger

  1. Click Save

Hit Save

Step 3: Test Your Event

  1. Click Preview in the top right

Hit Preview

  1. Enter your website URL and hit Connect

Enter Website URL

  1. Navigate to a category page or product page.
  2. Verify view_item_list appears in Tags Fired

Verify Tag Fired

warning

Always test before publishing to avoid sending bad data.

Step 4: Publish

  1. Click Submit on the workspace's top-right corner

Submit Workspace

  1. Add a version name (e.g., "Added view_item_list event")
  2. Click Publish

Version Submission

Verify in GA4

  1. Go to analytics.google.com
  2. Navigate to Reports → Realtime
  3. Visit a category page
  4. Check for view_item_list in the event list

Historical data appears in Reports → Engagement → Events within 24 hours.

Need Help?

Contact the Globber IT team for assistance with GTM setup or custom events.

Learn More