1<script>
2 function addEvent(obj, evt, fn) {
3 obj.addEventListener(evt, fn, false);
4 }
5
6 function handleMouseLeave(evt) {
7 if (window.sessionStorage) {
8 var timeout = JSON.parse(window.sessionStorage.getItem('__ue__timeout'));
9 if (timeout) {
10 var elapsedTime = (new Date() - timeout) / (1000 * 60);
11 if (elapsedTime <= 1) {
12 return;
13 }
14 }
15 }
16
17 if (evt.clientY <= 0) {
18 userengage('event.Exit intent', {
19 URL: window.location.href
20 });
21 if (window.sessionStorage) {
22 window.sessionStorage.setItem('__ue__timeout', JSON.stringify(+new Date()));
23 }
24 }
25 }
26
27 addEvent(document, 'mouseleave', handleMouseLeave);
28</script>
1<script>
2 function addEvent(obj, evt, fn) {
3 obj.addEventListener(evt, fn, false);
4 }
5
6 function handleMouseLeave(evt) {
7 if (window.sessionStorage) {
8 var timeout = JSON.parse(window.sessionStorage.getItem('__ue__timeout'));
9 if (timeout) {
10 var elapsedTime = (new Date() - timeout) / (1000 * 60);
11 if (elapsedTime <= 1) {
12 return;
13 }
14 }
15 }
16
17 if (evt.clientY <= 0) {
18 userengage('event.Exit intent', {
19 URL: window.location.href
20 });
21 if (window.sessionStorage) {
22 window.sessionStorage.setItem('__ue__timeout', JSON.stringify(+new Date()));
23 }
24 }
25 }
26
27 addEvent(document, 'mouseleave', handleMouseLeave);
28</script>
1<script>
2 function addEvent(obj, evt, fn) {
3 obj.addEventListener(evt, fn, false);
4 }
5
6 function handleMouseLeave(evt) {
7 if (window.sessionStorage) {
8 var timeout = JSON.parse(window.sessionStorage.getItem('__ue__timeout'));
9 if (timeout) {
10 var elapsedTime = (new Date() - timeout) / (1000 * 60);
11 if (elapsedTime <= 1) {
12 return;
13 }
14 }
15 }
16
17 if (evt.clientY <= 0) {
18 userengage('event.Exit intent', {
19 URL: window.location.href
20 });
21 if (window.sessionStorage) {
22 window.sessionStorage.setItem('__ue__timeout', JSON.stringify(+new Date()));
23 }
24 }
25 }
26
27 addEvent(document, 'mouseleave', handleMouseLeave);
28</script>
When a user attempts to leave the website without providing any data, an exit-intent pop-up is triggered by their mouse moving towards the close button. This pop-up displays a catchy and attractive offer, enticing the user to subscribe to the newsletter, effectively turning a potential exit into a valuable engagement opportunity.
Implementing use case automation involves several key steps and tools. Here's a comprehensive ressources to get you started:
Collect information from your visitors and navigate them on the website.
Automate SMS delivery based on user actions or specific conditions.
Delivers personalized notifications to users of your website (webpush) or app (mobile push).
Easily design and customize landing pages that convert visitors into leads, optimizing the journey from click to action.
Event name | Event parameters | |
---|---|---|
Exit intent | Event is fired on a mouse leave action. It is sent via GTM. | |
Send opt in | Event is sent each time the user fills the form/pop-up to subscribe to the newsletter. It will trigger the Double Opt-in process. |