3. Tags & Triggers in Google Tag Manager

GTM Tags for Custom GA4 Events

Name your tag according to the widget event you are setting up

Select the “Google Analytics GA4 Event” tag

Configuration tag set to “GA4”

Add "Event Name": This should match your Event Name from above when you created the GA4 event (Example - widget_opened)

GTM Custom Event Triggers

These custom event triggers will fire whenever ChatHQ sends event data into your GTM, which will then send the data from your GTM to your GA4.

Follow the instructions and screenshots below to setup "Custom Event" triggers and apply them to your newly created tags:

When creating a trigger for your GTM tag, select "Custom Event"

You will need to configure your new trigger to match the Engagement Widget GA4 event your are connecting it to. For example, in the screenshot below you will see the "event name" perfectly matches the widget event associated with this trigger. You will repeate this process for every widget event you add to GA4 so that GTM knows to trigger the event when this data is passed into the Data Layer.

Make sure you select the option "All Custom Events" when selecting when this trigger should fire!

When you have setup your Custom Event trigger properly, it should resemble the screenshot below.

VERY IMPORTANT: Remember, you will need a NEW TRIGGER for EVERY widget event you setup.

When you are finished creating all your custom event triggers, you should have a trigger for all the follow widget events:

  • widget_opened

  • widget_closed

  • tool_opened

  • tool_closed

  • welcome_message_clicked

  • welcome_message_closed

  • all_welcome_messages_closed

Last updated