Device Mode (beta)

Allows a defined number of devices, and blocks the others. A user is allowed to read only if the maximum number of devices is not reached.

Warning: Device Mode is actually in beta, don't use it in production.

Device Mode without any blocking, just monitoring

User journeys

  • You have decided to allow your subscribers to read your articles simultaneously on up to two devices.
  • USER 1 is reading an article.
  • USER 2 is reading an article at a same time with USER 1 account.
  • USER 3 wants to read an article at a same time with USER 1 account. At this moment, Capping is detecting that two devices are used in the same time, but no blocking message is displayed.

JavaScript integration

Add following lines into your html, just before the closing body tag. This javascript sdk integration launch tracking of simultaneous devices, without any blocking.

<script>
var CAPPING_CONFIG = {
brand: "<BRAND_UUID>", //mandatory
userId: "<THE_USER_ID>", //mandatory
mode: "device",
tolerance: 2, //default: 1
};
</script>
<script async src="https://capping.sirius.press/sdk.v1.0.0.js"></script>
ParamTypeDescription
CAPPING_CONFIG.brandstringA brand uuid that we'll give you
CAPPING_CONFIG.userIdstringThe ID of the user, that you can write encrypted or hashed
CAPPING_CONFIG.modestringTwo modes are available, reading (default) and device
CAPPING_CONFIG.toleranceintThe number of devices that can be used at the same time

Note: Declaring CAPPING_CONFIG.brand and CAPPING_CONFIG.userId will automatically launch simultaneous devices tracking. If you don’t want to launch Capping, do not define these variables and/or do not insert the javascript sdk.

Device Mode with blocking

User journeys

  • You have decided to allow your subscribers to read your articles simultaneously on up to two devices.
  • USER 1 is reading an article.
  • USER 2 is reading an article at a same time with USER 1 account.
  • USER 3 wants to read an article at a same time with USER 1 account. At this moment, Capping is detecting that the first user is reading, so USER 2 is blocked.

JavaScript integration

Add following lines into your html where you want to display blocking message when simultaneous readings is detected.

<div id="capping" style="display: none">
<p>Your subscription is used on another device.</p>
<h3>You can only use your account on one device at the same time</h3>
<a href="#" onclick="restartCapping()">Continue reading</a>
</div>
  • restartCapping(): This function is defined by javascript sdk and allows you to restart Capping when a user is blocked.

Then, add following lines into your html, just before the closing body tag. This javascript sdk integration launch tracking of simultaneous devices, and will execute togglePopinFunction when simultaneous devices will be detected.

<script>
var CAPPING_CONFIG = {
brand: "<BRAND_UUID>", //mandatory
userId: "<THE_USER_ID>", //mandatory
mode: "device",
tolerance: 2, //default: 1
// this function helps you to display something to block reading
// It is just an example, feel free to change it as you want
togglePopinFunction: function () {
x = document.getElementById("capping");
if (x.style.display === "none") {
x.style.display = "block";
} else {
x.style.display = "none";
}
},
};
</script>
<script async src="https://capping.sirius.press/sdk.v1.0.0.js"></script>
ParamTypeDescription
CAPPING_CONFIG.brandstringA brand uuid that we'll give you
CAPPING_CONFIG.userIdstringThe ID of the user, that you can write encrypted or hashed
CAPPING_CONFIG.modestringTwo modes are available, reading (default) and device
CAPPING_CONFIG.toleranceintThe number of devices that can be used at the same time
CAPPING_CONFIG.togglePopinFunctionfunctionThis function is triggered when the maximum of devices is reached, and for the users that are not already allowed to read. It helps you to display messages, popin, banner...
Edit this page on GitHub