Scarcity Counter is a WordPress plugin for artificial scarcity. It is great for marketing purposes. By providing timelimits and random reduction numbers it aims to make it not too obvious it's fake. Be aware that it is just client side. So if the user visit your site on another device another number will be visible.
It works with multiple counters on a page. Use the same id
attribute to show the same counter at different places on your page.
You can see it in action on Codepen.
[scarcity-counter id="id" start="27" min="3" reduction="3" timelimit="5000"]
- id Unique id to identify the counter. You should always use new ids on different pages! If used multiple times on the same page, the same number is shown. defaults to
id
. - start number to start with. defaults to
27
. - min lower limit. the counter won't ever get below that limit. defaults to
3
. - reduction upper range limit. E.g. if 5 is set as the limit, the counter will be reduced by a number between 1 and 5. defaults to
3
. - timelimit number in milliseconds how long to wait until another reduction (on page reload). defaults to
5000
.
To compile this plugin, it requires the following modules installed on your system:
To compile the plugin follow the following steps:
- Navigate to this plugins directory
- Setup composer:
composer install
- Install npm modules:
npm install
After you followed the steps above you're able to compile the project with
grunt build
.
Use grunt watch
to watch the files for changes.
FYI: You can just go to Releases to download a already compiled release.