Engagement events

GTM Kit fires the standard Google Analytics 4 engagement events out of the box, alongside its e-commerce events. The Engagement events section adds four events that round out a GA4 funnel: login, sign_up, search, and generate_lead. Each has its own toggle and all default to on, so the events start firing the moment you upgrade.

The events

  • login fires on every successful WordPress and WooCommerce account login. The method parameter defaults to wordpress.
  • sign_up fires on every new account registration, including accounts created during WooCommerce checkout. The method parameter distinguishes a checkout-created account (woocommerce) from a standalone registration (wordpress), so you can split those funnels in GA4.
  • search fires on WordPress and WooCommerce product search results pages, with the query in the search_term parameter.
  • generate_lead fires alongside the existing form_submit event on successful Contact Form 7 submissions, so your GA4 lead conversions are first-class rather than a filter on form_submit.

Turn events on or off

Go to GTM Kit, Settings and open the Engagement events section. Each event has its own toggle, all on by default. Switch one off if your GTM container or GA4 setup already produces it, to avoid duplicate events. The generate_lead toggle depends on the Contact Form 7 integration being enabled.

Works with full-page caching

Engagement events are cache-safe by design. The events that depend on a user action (login and sign_up) are handed off through a short-lived cookie that the browser reads and clears on the next page, so nothing per-visitor is ever baked into cached HTML. The search event is read from the URL. All four work behind full-page caches such as Cloudflare, Varnish, LiteSpeed, and WP Rocket.

generate_lead and Contact Form 7

When the Contact Form 7 integration is active, a successful submission pushes form_submit first and then generate_lead in the same tick. You no longer need to map form_submit to a lead conversion by hand in GTM. To attach a value to the lead, use the gtmkit_engagement_event_generate_lead_payload filter (see For developers). See also Contact Form 7 Integration.

Verify it worked

Open DevTools and inspect the data layer after the matching action. For example, after a search on /?s=widget:

window.dataLayer.filter(e => e.event === 'search')

You should see one entry with search_term: "widget". Log in on another tab and check for a single login event on the next page; it should not re-fire on reload.

For developers

Several filters let you adapt the engagement events from code without forking the plugin:

  • gtmkit_engagement_event_login_method and gtmkit_engagement_event_signup_method tag the method parameter.
  • gtmkit_engagement_event_search_term normalises the search term before it is pushed.
  • gtmkit_engagement_event_generate_lead_payload assigns a lead value and currency (or any extra fields).
  • gtmkit_engagement_event_cookie_name renames the handoff cookie.
  • gtmkit_engagement_event_should_emit is a final veto on any engagement event.
  • gtmkit_is_search_results_page opts a custom search template into the search event.

Full signatures and examples are on Settings, actions and filters for developers.