Skip to content

Script options

There are some optional configuration options you can pass into the script using data-* attributes.

appVersion
[String] Your application's version, e.g. web/app build number.
detectAdBlock
[Boolean] Whether or not to detect AdBlocking software. Defaults to true.
exitIntentMobileScrollTop
[Boolean] Mobile only. Whether to consider user scrolling to the top of the page as an “exit intent“. Defaults to true.
live
[Boolean] Whether to show only “live“ popups. Set this to false only for development or testing. Defaults to true.
mode
[String] There are modes: normal and analytics. The normal enables all features; the analytics mode disables popups.
trackClicks
[String | Boolean] The script automatically collects clicks on button elements. You can disable this feature by setting false or you can configure a CSS selector (e.g. .track-click). Defaults to true.
trackForms
[String | Boolean] The script automatically collects form submissions. You can disable this feature by setting false or you can configure a CSS selector (e.g. .track-form). Defaults to true.

Example 1 - disable auto-tracking

<script
  async
  src="https://gateway.wiryio.com/script/1.0/{YOUR_ACCOUNT_ID}.js"
  data-track-clicks=".track-this"
  data-track-forms="false"
></script>

Example 2 - options as url-encoded JSON object

{"detectAdBlock":false,"trackClicks":false,"trackForms":false}

<script
  async
  src="https://gateway.wiryio.com/script/1.0/{YOUR_ACCOUNT_ID}.js"
  data-options="%7B%22detectAdBlock%22%3Afalse%2C%22trackClicks%22%3Afalse%2C%22trackForms%22%3Afalse%7D"
></script>