{"_id":"ouibounce","_rev":"10-fd85af762bcb4e876aa1e399127d5b4c","name":"ouibounce","description":"Show some HTML before visitors leave your site.","dist-tags":{"latest":"0.0.12"},"versions":{"0.0.9":{"name":"ouibounce","version":"0.0.9","description":"Show some HTML before visitors leave your site.","main":"build/ouibounce.js","directories":{"test":"test"},"scripts":{"test":"mocha"},"repository":{"type":"git","url":"git://github.com/carlsednaoui/ouibounce.git"},"author":{"name":"Carl Sednaoui"},"license":"MIT","bugs":{"url":"https://github.com/carlsednaoui/ouibounce/issues"},"homepage":"https://github.com/carlsednaoui/ouibounce","devDependencies":{"gulp":"~3.5.0","gulp-uglify":"~0.1.0","gulp-rename":"~0.2.2","gulp-autoprefixer":"0.0.6","gulp-minify-css":"~0.3.0","gulp-wrap-umd":"~0.1.1","mocha":"~1.17.1","should":"~3.1.2","zombie":"~2.0.0-alpha29","gulp-stylus":"0.0.13"},"_id":"ouibounce@0.0.9","_shasum":"ed9c727cd3fd49375a6daca1dc8011e74d2d2a5c","_from":".","_npmVersion":"1.4.10","_npmUser":{"name":"alebcay","email":"calebcenter@live.com"},"maintainers":[{"name":"alebcay","email":"calebcenter@live.com"}],"dist":{"shasum":"ed9c727cd3fd49375a6daca1dc8011e74d2d2a5c","tarball":"https://registry.npmjs.org/ouibounce/-/ouibounce-0.0.9.tgz","integrity":"sha512-VeTVBUuPYdwafjT0LKjPABv6S5wfvYWCoQO4wx/CVGXWtnu4Oen89itDlwMYuqn9xSqv0uxAxdjfbwZsi+9t0w==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCH1w/D3+g1wzfufly+Hl0OSRBiLIzU+nWJmPGP92wDkQIgC7Ntz6ZkbHYT/Jm3M1H2374RAV0Dzxtc4PAoJNiWM7I="}]}},"0.0.10":{"name":"ouibounce","version":"0.0.10","description":"Show some HTML before visitors leave your site.","main":"build/ouibounce.js","directories":{"test":"test"},"scripts":{"test":"mocha"},"repository":{"type":"git","url":"git://github.com/carlsednaoui/ouibounce.git"},"author":{"name":"Carl Sednaoui"},"license":"MIT","bugs":{"url":"https://github.com/carlsednaoui/ouibounce/issues"},"homepage":"https://github.com/carlsednaoui/ouibounce","devDependencies":{"gulp":"~3.5.0","gulp-uglify":"~0.1.0","gulp-rename":"~0.2.2","gulp-autoprefixer":"0.0.6","gulp-minify-css":"~0.3.0","gulp-wrap-umd":"~0.1.1","mocha":"~1.17.1","should":"~3.1.2","zombie":"~2.0.0-alpha29","gulp-stylus":"0.0.13"},"_id":"ouibounce@0.0.10","_shasum":"832d7f770c7ee84a2e734db92cd188a64e87d9c7","_from":".","_npmVersion":"1.4.9","_npmUser":{"name":"alebcay","email":"calebcenter@live.com"},"maintainers":[{"name":"alebcay","email":"calebcenter@live.com"},{"name":"carlsednaoui","email":"carlsed@gmail.com"}],"dist":{"shasum":"832d7f770c7ee84a2e734db92cd188a64e87d9c7","tarball":"https://registry.npmjs.org/ouibounce/-/ouibounce-0.0.10.tgz","integrity":"sha512-LlJDxq7TmjnmZFizmw8+D4LqUuyLO61hfjxyFEoPjURRf8w7ScMAvDPc9X6OY3vg1Hgh4uvmOsWXcD8uTD7w+w==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBqR3fsJm1FUcG//aZEkb3p9sVnsZhYmCTHwm4GOK0CsAiEAzwNCKohrofE97BMfuo31E9QucW/dnoeRUKvo15WwEC0="}]}},"0.0.11":{"name":"ouibounce","version":"0.0.11","description":"Show some HTML before visitors leave your site.","main":"build/ouibounce.js","directories":{"test":"test"},"scripts":{"test":"mocha"},"repository":{"type":"git","url":"git://github.com/carlsednaoui/ouibounce.git"},"author":{"name":"Carl Sednaoui"},"license":"MIT","bugs":{"url":"https://github.com/carlsednaoui/ouibounce/issues"},"homepage":"https://github.com/carlsednaoui/ouibounce","devDependencies":{"gulp":"~3.5.0","gulp-uglify":"~0.1.0","gulp-rename":"~0.2.2","gulp-autoprefixer":"0.0.6","gulp-minify-css":"~0.3.0","gulp-wrap-umd":"~0.1.1","mocha":"~1.17.1","should":"~3.1.2","zombie":"~2.0.0-alpha29","gulp-stylus":"0.0.13"},"_id":"ouibounce@0.0.11","dist":{"shasum":"f83a04a581c5c657bfb532ebfd9d5f3753656fef","tarball":"https://registry.npmjs.org/ouibounce/-/ouibounce-0.0.11.tgz","integrity":"sha512-WetxorPJOqtPe1EvPuDUkS31aJ8SLLrab/tFUc7uZ+HEu4IlHpcD0i008i8+B01MUw718b1gTtULJQC5NiXzjQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCFcI/uVjiqh2MuuG1ZZWQYWtHousXxhHGN59GImt/TowIhALIWsDpazzGNLer7Nw+IwL4N3ylmssgPR39XEhyqOEJh"}]},"_from":".","_npmVersion":"1.4.3","_npmUser":{"name":"carlsednaoui","email":"carlsed@gmail.com"},"maintainers":[{"name":"alebcay","email":"calebcenter@live.com"},{"name":"carlsednaoui","email":"carlsed@gmail.com"}]},"0.0.12":{"name":"ouibounce","version":"0.0.12","description":"Show some HTML before visitors leave your site.","main":"build/ouibounce.js","directories":{"test":"test"},"scripts":{"test":"mocha"},"repository":{"type":"git","url":"git://github.com/carlsednaoui/ouibounce.git"},"author":{"name":"Carl Sednaoui"},"license":"MIT","bugs":{"url":"https://github.com/carlsednaoui/ouibounce/issues"},"homepage":"https://github.com/carlsednaoui/ouibounce","devDependencies":{"gulp":"~3.5.0","gulp-uglify":"~0.1.0","gulp-rename":"~0.2.2","gulp-autoprefixer":"0.0.6","gulp-minify-css":"~0.3.0","gulp-wrap-umd":"~0.1.1","mocha":"~1.17.1","should":"~3.1.2","zombie":"~2.0.0-alpha29","gulp-stylus":"0.0.13","jshint-stylish":"~2.0.0","gulp-jshint":"~1.11.0"},"gitHead":"6d927a42b699c24ffde7a66501e96ceea1782339","_id":"ouibounce@0.0.12","_shasum":"3266f02364f7bd02873423b7b5df7850ca5743cf","_from":".","_npmVersion":"1.4.28","_npmUser":{"name":"carlsednaoui","email":"carlsed@gmail.com"},"maintainers":[{"name":"alebcay","email":"calebcenter@live.com"},{"name":"carlsednaoui","email":"carlsed@gmail.com"}],"dist":{"shasum":"3266f02364f7bd02873423b7b5df7850ca5743cf","tarball":"https://registry.npmjs.org/ouibounce/-/ouibounce-0.0.12.tgz","integrity":"sha512-Jxj79yq4x2gd5vj2hYfCKGy03IZrXgbCCiHvCe+5Crtc02mpLxggXaOI2wXH9At8Lx3GSlvbiTUvrQ75dUVtAA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIG4DjaT8W6PPaSpvgXLnREHXW/IzgP9tr+pRmd6KBVXMAiEAwZgzhfvCyJ3dLAzP80mKR8Kl9js4fipGdGywYUs3qYQ="}]},"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/ouibounce-0.0.12.tgz_1467674001484_0.8817881227005273"}}},"readme":"# Ouibounce\n> Originally created by [Carl Sednaoui](http://carlsednaoui.com/about?utm_source=github&utm_medium=ouibounce-description&utm_campaign=carlsednaoui) from [MailCharts](http://www.mailcharts.com/?utm_source=github&utm_medium=ouibounce-description&utm_campaign=carlsednaoui). Maintained and improved by [generous contributors](https://github.com/carlsednaoui/ouibounce/graphs/contributors). \n\n\n\n[![tests](http://img.shields.io/travis/carlsednaoui/ouibounce.svg?style=flat)](https://travis-ci.org/carlsednaoui/ouibounce) [![twitter](http://img.shields.io/badge/twitter-@carlsednaoui-blue.svg?style=flat)](http://twitter.com/carlsednaoui)\n\nOuibounce: A small library enabling you to display a modal before a user leaves your website.\n\n![](http://cl.ly/image/2C2p0l3W1M00/ouibounce.gif)\n\n> **Quick note**: [Let me know](https://twitter.com/carlsednaoui) if you end up using Ouibounce. I'd love to hear about your project / see Ouibounce in the wild :)\n\n### The philosophy behind this project\n\nThis library helps you increase landing page conversion rates. From my experience, you can expect a lift of 7% to 15% depending on your audience, traffic type (paid or unpaid) and copy.\n\nTalking about copy... __please__ use Ouibounce to __provide value__ to your visitors. With tools like these __it's very easy to create something spammy-looking__.\n\nNot sure what I mean by _provide value_? Here are a few ideas to get your creative juices flowing:\n\n- Free ebook\n- Upcoming webinar invite\n- Exclusive access to XYZ\n- [A full educational course](http://do.thelandingpagecourse.com/)\n- [Valuable content](https://training.kalzumeus.com/)\n\n## Demo / Examples\n\n- [Example #1](http://carlsednaoui.github.io/ouibounce/)\n- [Example #2](http://colors.carlsednaoui.com/)\n\n## Modal inspiration\n\nI've designed a few modals just for you. Feel free to use these as inspiration.\n\n![fancy with content](https://cloud.githubusercontent.com/assets/791818/5060267/60768e64-6d1a-11e4-813e-b4c6f9ea4e9f.png)\n![fancy no header](https://cloud.githubusercontent.com/assets/791818/5060264/6071f214-6d1a-11e4-8a4b-ae929b337a3f.png)\n![simple](https://cloud.githubusercontent.com/assets/791818/5060268/607786e8-6d1a-11e4-9084-3430e2a158d8.png)\n![simple with book](https://cloud.githubusercontent.com/assets/791818/5060673/025d51a2-6d31-11e4-85eb-362f8dc9ccc0.png)\n![simple with feedback](https://cloud.githubusercontent.com/assets/791818/5060266/6075d2b2-6d1a-11e4-891a-40a16465aa9a.png)\n\n\n## Installation\n\nYou have a few options to choose from:\n\n- Download the [minified](build/ouibounce.min.js) or [unminified](build/ouibounce.js) script and include it on your page\n- Get Ouibounce from [cdnjs.com](http://cdnjs.com/libraries/ouibounce/)\n- Use Bower: `curl http://bower.herokuapp.com/packages/ouibounce`\n- Use NPM: `npm install ouibounce`\n\n_Note_: Ouibounce is wrapped by a [umd wrapper](https://github.com/ForbesLindesay/umd), so if you are using _requirejs/amd_ or _commonjs/browserify_, it will still work fine.\n\n## Usage\n\n1. Create a hidden modal\n1. Select the modal with vanilla JavaScript (or jQuery) and call `ouibounce`\n1. Optional: Save the function's return value to use the public API, allowing you to `fire` or `disable` Ouibounce on demand\n\n_Example:_    \n```js\nouibounce(document.getElementById('ouibounce-modal'));\n```\n\n_Example with jQuery:_    \n```js \nouibounce($('#ouibounce-modal')[0]);\n```\n\n_Example using the public api:_    \n```js\nvar modal = ouibounce(document.getElementById('ouibounce-modal'));\nmodal.fire()\n```\n\n### Options\n\nOuibounce offers a few options, such as:\n\n- [Sensitivity](#sensitivity)\n- [Aggressive mode](#aggressive-mode)\n- [Timer](#set-a-min-time-before-ouibounce-fires)\n- [Delay](#delay)\n- [Callback](#callback)\n- [Cookie expiration](#cookie-expiration)\n- [Cookie domain](#cookie-domain)\n- [Cookie name](#cookie-name)\n- [Sitewide cookie](#sitewide-cookie)\n- [Chaining options](#chaining-options)\n\n##### Sensitivity\nOuibounce fires when the mouse cursor moves close to (or passes) the top of the viewport. You can define how far the mouse has to be before Ouibounce fires. The higher value, the more sensitive, and the more quickly the event will fire. _Defaults to 20._\n\n_Example:_    \n```js\nouibounce(document.getElementById('ouibounce-modal'), { sensitivity: 40 });\n```\n\n##### Aggressive mode\nBy default, Ouibounce will only fire once for each visitor. When Ouibounce fires, a cookie is created to ensure a _non obtrusive_ experience.\n\nThere are cases, however, when you may want to be more aggressive (as in, you want the modal to be elegible to fire anytime the page is loaded/ reloaded). An example use-case might be on your paid landing pages. If you enable `aggressive`, the modal will fire any time the page is reloaded, for the same user.\n\n_Example:_    \n```js\nouibounce(document.getElementById('ouibounce-modal'), { aggressive: true });\n```\n\n##### Set a min time before Ouibounce fires\nBy default, Ouibounce won't fire in the first second to prevent false positives, as it's unlikely the user will be able to exit the page within less than a second. If you want to change the amount of time that firing is surpressed for, you can pass in a number of milliseconds to `timer`.\n\n_Example:_    \n```js\nouibounce(document.getElementById('ouibounce-modal'), { timer: 0 });\n```\n\n##### Delay\nBy default, Ouibounce will show the modal immediately.  You could instead configure it to wait `x` milliseconds before showing the modal.  If the user's mouse re-enters the body before `delay` ms have passed, the modal will not appear.  This can be used to provide a \"grace period\" for visitors instead of immediately presenting the modal window.\n\n_Example:_\n\n```js\n// Wait 100 ms\nouibounce(document.getElementById('ouibounce-modal'), { delay: 100 });\n```\n\n##### Callback\nYou can add a callback, which is a function that will run once Ouibounce has been triggered, by using the `callback` option.\n\n_Example:_    \n```js\nouibounce(document.getElementById('ouibounce-modal'), { callback: function() { console.log('Ouibounce fired!'); } });\n```\n\n##### Cookie expiration\nOuibounce sets a cookie by default to prevent the modal from appearing more than once per user. You can add a cookie expiration (in days) using `cookieExpire` to adjust the time period before the modal will appear again for a user. By default, the cookie will expire at the end of the session, which for most browsers is when the browser is closed entirely.\n\n_Example:_    \n```js\nouibounce(document.getElementById('ouibounce-modal'), { cookieExpire: 10 });\n```\n\n##### Cookie domain\nOuibounce sets a cookie by default to prevent the modal from appearing\nmore than once per user. You can add a cookie domain using\n`cookieDomain` to specify the domain under which the cookie should work.\nBy default, no extra domain information will be added. If you need a\ncookie to work also in your subdomain (like blog.example.com and\nexample.com), then set a cookieDomain such as .example.com (notice the\ndot in front).\n\n_Example:_    \n```js\nouibounce(document.getElementById('ouibounce-modal'), { cookieDomain:\n'.example.com' });\n```\n\n##### Cookie name\nYou can specify cookie name passing `cookieName: 'customCookieName'`.\n\n_Example:_    \n```js\nouibounce(document.getElementById('ouibounce-modal'), { cookieName: 'customCookieName' });\n```\n\n##### Sitewide cookie\nYou can drop sitewide cookies by using passing `sitewide: true`.\n\n_Example:_    \n```js\nouibounce(document.getElementById('ouibounce-modal'), { sitewide: true });\n```\n\n##### Chaining options\nThe options are just javascript objects, you can therefore combine multiple options.\n\n_Example:_    \n```js\nouibounce(document.getElementById('ouibounce-modal'), {\n  aggressive: true,\n  sitewide: true,\n  cookieDomain: '.example.com',\n  timer: 0,\n  callback: function() { console.log('ouibounce fired!'); }\n});\n```\n\n### Ouibounce API\n\nIf you save the object returned by the `ouibounce` function, you get access to a small public API. Use this API to `fire` or `disable` Ouibounce on demand.\n\n_Example:_    \n```js\nvar modal = ouibounce(document.getElementById('ouibounce-modal'));\nmodal.fire(); // fire the ouibounce event\nmodal.disable() // disable ouibounce, it will not fire on page exit\nmodal.disable({ cookieExpire: 50, sitewide: true }) // disable ouibounce sitewide for 50 days. \n```\n\n##### Disable options\nThe `disable` function accepts a few options:\n- [Cookie expiration](#cookie-expiration)\n- [Cookie domain](#cookie-domain)\n- [Cookie name](#cookie-name)\n- [Sitewide cookie](#sitewide-cookie)\n\n### Using Ouibounce with other libraries\nIf you want to use this library with other plugins — such as [Vex](http://github.hubspot.com/vex/docs/welcome/) — you can call ouibounce with `false`. See [#30](https://github.com/carlsednaoui/ouibounce/issues/30) for discussion.\n\n\n```js\nvar _ouibounce = ouibounce(false, {\n  callback: function() { console.log('ouibounce fired!'); }\n});\n```\n\n##### Twitter Bootstrap\nIf you're trying to use Ouibounce with Twitter Bootstrap and are simply copying the example code I've included in the demo, you might run into some problems. See #[66](https://github.com/carlsednaoui/ouibounce/issues/66) to fix this.\n\n### Legacy JS engines\nIf you'd like Ouibounce to work in legacy JS engines (IE8 and below, for example), you'll need to add a shim such as [es5-shim](https://github.com/es-shims/es5-shim).\n\n### WordPress\n[Tomaž](https://github.com/tomazzaman) wrote [a great tutorial](https://codeable.io/community/how-to-build-your-own-wordpress-email-form-optin-form/) on how to build your own WordPress opt-in form.\n\n[Kevin Weber](http://kevinw.de/wbounce) wrote [wBounce](https://wordpress.org/plugins/wbounce/), a WordPress plugin. I personally have __not__ tested it, but have heard it works really well. Check it out.\n\n### Miscellaneous\n\n- This library provides no guarantees.\n- If you are intersted in contributing, make sure to check out [contributing.md](contributing.md).\n- Licensed under [MIT](license.md).\n- Special thanks to [Zertosh](https://github.com/zertosh), [Jenius](https://github.com/jenius) and all other [contributors](//github.com/carlsednaoui/ouibounce/graphs/contributors).\n\n[![Analytics](https://ga-beacon.appspot.com/UA-49243488-1/ouibounce/readme)](https://github.com/igrigorik/ga-beacon)\n","maintainers":[{"name":"alebcay","email":"calebcenter@live.com"},{"name":"carlsednaoui","email":"carlsed@gmail.com"}],"time":{"modified":"2022-06-23T04:20:57.556Z","created":"2014-06-03T13:30:58.360Z","0.0.9":"2014-06-03T13:30:58.360Z","0.0.10":"2014-09-06T20:21:47.897Z","0.0.11":"2015-02-03T00:12:20.030Z","0.0.12":"2016-07-04T23:13:23.960Z"},"homepage":"https://github.com/carlsednaoui/ouibounce","repository":{"type":"git","url":"git://github.com/carlsednaoui/ouibounce.git"},"author":{"name":"Carl Sednaoui"},"bugs":{"url":"https://github.com/carlsednaoui/ouibounce/issues"},"license":"MIT","readmeFilename":"README.md"}