Skip to main content

Poptin GTM Event Listener

Track Poptin popup interactions in GTM. Monitor display, close, form submission, and conversion events with popupAction and poptinID variables.

poptinpopuplead-generationgtmga4email-captureexit-intent

Event fired

poptinPopUpEvent

Key variable

popupAction

Poptin

Overview

Poptin is a popup and form builder for lead generation, offering exit-intent popups, overlays, slide-ins, and embedded forms. This listener hooks into Poptin's JavaScript event system to track popup interactions.

Event fired: poptinPopUpEvent Variables: popupAction, poptinID

Why Use This Listener

Popup conversion rates are a key metric for lead generation. This listener tells you not just how many forms were submitted, but how many popups were shown, how many were dismissed, and what the conversion rate per popup is.

Tracked Events

popupActionDescription
popup displayedPopup shown to visitor
popup closedPopup dismissed
form submittedPopup form completed
button clickedCTA button clicked
exit intent triggeredExit-intent fired

Installation

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

  document.addEventListener('poptinLoaded', function(e) {
    poptinPush('popup displayed', { poptinID: e.detail && e.detail.id });
  });
  document.addEventListener('poptinClosed', function(e) {
    poptinPush('popup closed', { poptinID: e.detail && e.detail.id });
  });
  document.addEventListener('poptinFormSubmitted', function(e) {
    poptinPush('form submitted', { poptinID: e.detail && e.detail.id });
  });
  document.addEventListener('poptinButtonClicked', function(e) {
    poptinPush('button clicked', { poptinID: e.detail && e.detail.id });
  });
})();
</script>

Data Layer Output

json
{
  "event": "poptinPopUpEvent",
  "popupAction": "form submitted",
  "poptinID": "poptin_abc123"
}

Trigger Configuration

Trigger: Custom Event | poptinPopUpEvent

Conversion only:

Condition: DLV – Poptin Action | equals | form submitted

Variables to Capture

Variable NameDL KeyExample
DLV – Poptin ActionpopupAction"form submitted"
DLV – Poptin IDpoptinID"poptin_abc123"

GA4 Mapping

GA4 EventConditionParameters
view_promotionpopup displayedpopup_id, popup_name
generate_leadform submittedpopup_id, method: "poptin"

Best Practices

  1. Track impression-to-submission ratio per poptinID in GA4 to measure popup effectiveness
  2. Use popupAction = popup closed with session data to analyze exit patterns
  3. Create separate conversion events for exit-intent vs. time-delay popups

Related Listeners