A custom event trigger lets Google Tag Manager respond to an event name pushed into the data layer. It is useful when a page interaction is handled by JavaScript and the browser’s ordinary page, click, or form events do not reliably represent the completed action. The event contract should be agreed with the site implementation team.

Agree on the event contract
Choose a stable event name such as a completed form or confirmed signup. Define exactly when it is pushed, which values accompany it, and whether it can happen more than once. The push should occur after the application knows the action succeeded, not when a user merely starts interacting.
Keep data-layer keys consistent and avoid personal information. Use a form ID, product category, or other non-sensitive value only when it supports a specific reporting need.
Connect the event to a GTM trigger
Create a Custom Event trigger using the exact event name and any necessary conditions. If the event is nested in a page-specific workflow, add conditions that prevent unrelated tags from firing. Create data-layer variables for the values the tag needs, and verify their names and types in Preview.
The event name is case-sensitive in many implementations. A mismatch in spelling, capitalization, or push timing can prevent the trigger from matching. Inspect the data layer at the moment of the push rather than guessing from the page appearance.
Test the event end to end
Perform both successful and unsuccessful actions. Confirm that only the success path creates the event, the trigger fires once, the expected values appear, and the destination platform records the test. If a page framework re-registers listeners after navigation, test the second visit as well.
- One event name should describe one business action.
- Use consistent key names across pages and forms.
- Keep a measurement-plan owner for changes to the event contract.
Related guides
- Google Tag Manager Data Layer: Events, Variables, and QA
- Google Tag Manager Form Tracking for AJAX and Single-Page Forms
How did this article land?
Choose one reaction. You can change it anytime.
