Skip to main content

Web Engage GTM Event Listener

Track Web Engage notification, survey, and web push interactions in GTM. Capture webEngageAction, webEngageType (survey/notification/web push/feedback) across 15+ events.

web-engagenotificationssurveysweb-pushgtmga4engagementretention

Event fired

webengage_event

Key variable

webEngageAction

Web Engage

Overview

Web Engage is a comprehensive marketing automation and engagement platform with push notifications, in-page notifications, surveys, and feedback widgets. This listener tracks 15+ events across all Web Engage features.

Event fired: webengage_event Variables: webEngageAction, webEngageType, notificationID, surveyID, webEngageEventData

webEngageType Values

webEngageTypeDescription
notificationIn-page notification
surveySurvey widget
web pushBrowser push notification
feedbackFeedback widget (deprecated)

Tracked Events (webEngageAction Values)

webEngageActionDescription
notification shownIn-page notification displayed
notification openedNotification clicked/expanded
notification closedNotification dismissed
notification clickedCTA in notification clicked
survey openedSurvey widget opens
survey closedSurvey dismissed
survey answeredSurvey question answered
survey completedSurvey finished
web push permission requestedPush permission prompt shown
web push subscribedUser grants push permission
web push blockedUser denies push permission
web push notification shownPush notification delivered
web push notification clickedPush notification clicked
web push notification closedPush notification dismissed

Installation

html
<!-- GTM Custom HTML Tag: Web Engage Listener -->
<script>
(function() {
  var weEvents = [
    // Notifications
    ['webengage.notification.shown', 'notification shown', 'notification'],
    ['webengage.notification.opened', 'notification opened', 'notification'],
    ['webengage.notification.close', 'notification closed', 'notification'],
    ['webengage.notification.click', 'notification clicked', 'notification'],
    // Surveys
    ['webengage.survey.shown', 'survey opened', 'survey'],
    ['webengage.survey.close', 'survey closed', 'survey'],
    ['webengage.survey.submit', 'survey answered', 'survey'],
    ['webengage.survey.complete', 'survey completed', 'survey'],
    // Web Push
    ['webengage.webpush.permission_request', 'web push permission requested', 'web push'],
    ['webengage.webpush.subscribe', 'web push subscribed', 'web push'],
    ['webengage.webpush.deny', 'web push blocked', 'web push'],
    ['webengage.webpush.notification.shown', 'web push notification shown', 'web push'],
    ['webengage.webpush.notification.click', 'web push notification clicked', 'web push'],
    ['webengage.webpush.notification.close', 'web push notification closed', 'web push']
  ];

  weEvents.forEach(function(def) {
    document.addEventListener(def[0], function(e) {
      var detail = e && e.detail;
      window.dataLayer = window.dataLayer || [];
      window.dataLayer.push({
        'event': 'webengage_event',
        'webEngageAction': def[1],
        'webEngageType': def[2],
        'notificationID': detail && detail.notificationId,
        'surveyID': detail && detail.surveyId,
        'webEngageEventData': detail
      });
    });
  });
})();
</script>

Data Layer Output

Survey Completed

json
{
  "event": "webengage_event",
  "webEngageAction": "survey completed",
  "webEngageType": "survey",
  "surveyID": "survey_123",
  "webEngageEventData": { "answers": [{ "question": "NPS", "answer": "9" }] }
}

Web Push Subscribed

json
{
  "event": "webengage_event",
  "webEngageAction": "web push subscribed",
  "webEngageType": "web push"
}

Trigger Configuration

All Events

Trigger: Custom Event | webengage_event

Per Type

Condition: DLV – WE Type | equals | survey

Conversions

Condition: DLV – WE Action | matches RegEx | (survey completed|web push subscribed)

Variables to Capture

Variable NameDL KeyExample
DLV – WE ActionwebEngageAction"survey completed"
DLV – WE TypewebEngageType"survey"
DLV – WE Survey IDsurveyID"survey_123"
DLV – WE Notification IDnotificationID"notif_456"

GA4 Mapping

GA4 EventConditionParameters
view_promotionnotification shownnotification_id, type
select_promotionnotification clickednotification_id
survey_completesurvey completedsurvey_id
push_subscribeweb push subscribedmethod: "webengage"

Related Listeners