How to install, configure and use Adless

Using Adless in your site requires three simple steps.

First, if you have not done this already, register a new site in Adless. This will produce a public key.

Second, load our client library in every page you want to use this service.

<script src="https://cdn.adless.io/adless.js"></script>

Finally, configure the library with the public key that you obtained on the first step.

<script>
  var adless = new Adless.Anonymous('<YOUR SITE KEY>');
  adless.start();
</script>

This will start Adless on any device and running at 100% of the available CPU.

Avoiding mobile devices

Batteries of mobile devices such as smartphones and tablets can take a hit when running Adless on their browsers, since Adless is all about computing power after all. The isMobile() function allows you to determine whether your users are visiting your site using a mobile device. The following example only runs Adless when the user is using their laptops or desktops:

<script>
  var adless = new Adless.Anonymous('<YOUR SITE KEY>');
  if (!adless.isMobile()) {
    adless.start();
  }
</script>

Limiting the CPU usage

Using all the computing power of your users might be too aggresive. You can be nice to them by using just a fraction of the available processing power instead of everything they got. This can be achieved by configuring the throttle parameter when you instantiate Adless.

This example sets the throttle parameter to 0.4, meaning that up to 60% of your users' CPU power will be used:

<script>
  var adless = new Adless.Anonymous('<YOUR SITE KEY>', {throttle: 0.4});
  adless.start();
</script>

Adless Javascript client API reference

We are currently working on this section. Stay tuned!