Set up custom tracking events for popup user activity

Business Benefits

Improve website conversion rates.


Copy the Element ID for the popup you want to track.

  1. Go to your website and open the specific popup that you wish to track.
  2. Right-click on the popup and click on Inspect Element.
  3. Select the top-most container, such as div, and copy the Element ID for the popup.

Set up a custom trigger event in Google Tag Manager for each time the popup is displayed.

In Google Tag Manager, create a new Trigger, select Element Visibility under Trigger Configuration, and select ID under Selection method. Enter the popup Element ID you copied earlier into the Elements field under ID.

Set up rules for the trigger to fire each time an element appears on screen.

Set Minimum Percent Visible to 50, tick Observe DOM changes, select All Visibility Events, and click Save.

Create a new tag with track type set to Event under Google Analytics: Universal Analytics in Google Tag Manager.

  1. Enter PopupView as the Category field and Opened as the Action.
  2. Enter a custom value like Services under Label if you want to identify unique pop-ups in your reporting dashboard.
  3. Select the custom trigger event you created for the popup under Triggering.

This image has an empty alt attribute; its file name is Setup-custom-tracking-events-for-pop-up-user-activity-3.png

This image has an empty alt attribute; its file name is Setup-custom-tracking-events-for-pop-up-user-activity-4.png