desktop

desktop is an object with the following properties:


  • triggerOnIdle - if true, the handlers will be triggered when the user is idle
  • triggerOnMouseLeave - if true, the handlers will be triggered when the user is about to leave your website
  • delayInSecondsToTrigger - delay in seconds to trigger the exit intent handlers on idle. triggerOnIdle must be true!
  • mouseLeaveDelayInSeconds - delay in seconds to trigger the exit intent handlers on mouse leave. triggerOnMouseLeave must be true!
  • useBeforeUnload - if true, the handlers will be triggered when the user is about to leave your website. UI will be blocked until the user cancels the action.

Default

delayInSecondsToTrigger: 10
mouseLeaveDelayInSeconds: 5
triggerOnMouseLeave: true
triggerOnIdle: false
useBeforeUnload: false

Example

useExitIntent({
  desktop: {
    delayInSecondsToTrigger: 10,
    mouseLeaveDelayInSeconds: 5,
    triggerOnMouseLeave: true,
    triggerOnIdle: false
    useBeforeUnload: false
  }
})