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
wisepopsEventKey variable
wisepopupActionWisepops
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
| wisepopupAction | Description |
|---|---|
popup displayed | Popup shown |
popup closed | Popup dismissed |
form submitted | Sign-up completed |
button clicked | CTA button clicked |
coupon copied | Discount 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 Name | DL Key | Example |
|---|---|---|
| DLV – Wisepops Action | wisepopupAction | "form submitted" |
| DLV – Wisepops ID | wisepopsID | "popup_123" |
GA4 Mapping
| GA4 Event | Condition | Parameters |
|---|---|---|
view_promotion | popup displayed | popup_id |
sign_up | form submitted | method: "wisepops", popup_id |