Skip to main content

Wisepops GTM Event Listener

Track Wisepops popup interactions in GTM. Monitor display, close, form submission, and click events with wisepopupAction and wisepopsID variables.

wisepopspopupecommercegtmga4email-capturelead-generation

Event fired

wisepopsEvent

Key variable

wisepopupAction

Wisepops

Overview

Wisepops is a popup and notification tool focused on eCommerce, with advanced targeting based on visitor behavior, cart state, and traffic source. This listener hooks into Wisepops' wisepops JavaScript event API.

Event fired: wisepopsEvent Variables: wisepopupAction, wisepopsID

Tracked Events

wisepopupActionDescription
popup displayedPopup shown
popup closedPopup dismissed
form submittedSign-up completed
button clickedCTA button clicked
coupon copiedDiscount code copied

Installation

html
<!-- GTM Custom HTML Tag: Wisepops Listener -->
<script>
(function() {
  function wisePush(action, extra) {
    window.dataLayer = window.dataLayer || [];
    window.dataLayer.push(Object.assign({
      'event': 'wisepopsEvent',
      'wisepopupAction': action
    }, extra || {}));
  }

  window.addEventListener('wisepops', function(e) {
    var evt = e && e.detail;
    if (!evt) return;
    
    var actionMap = {
      'view': 'popup displayed',
      'close': 'popup closed',
      'conversion': 'form submitted',
      'click': 'button clicked',
      'coupon_copy': 'coupon copied'
    };
    
    var action = actionMap[evt.event] || evt.event;
    wisePush(action, {
      wisepopsID: evt.popup_id,
      wisepopsName: evt.popup_name
    });
  });
})();
</script>

Data Layer Output

json
{
  "event": "wisepopsEvent",
  "wisepopupAction": "form submitted",
  "wisepopsID": "popup_123",
  "wisepopsName": "Email Signup"
}

Trigger Configuration

Trigger: Custom Event | wisepopsEvent

Conversion:

Condition: wisepopupAction | equals | form submitted

Variables to Capture

Variable NameDL KeyExample
DLV – Wisepops ActionwisepopupAction"form submitted"
DLV – Wisepops IDwisepopsID"popup_123"

GA4 Mapping

GA4 EventConditionParameters
view_promotionpopup displayedpopup_id
sign_upform submittedmethod: "wisepops", popup_id

Related Listeners