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 the same time with USER 1 account.
  • USER 3 wants to read an article at the same time with USER 1 account. At this moment, Capping is detecting those two devices are used at 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 siriusCapping = window.siriusCapping || {};
siriusCapping.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.1.0.js"></script>
ParamTypeDescription
siriusCapping.config.brandstringA brand uuid that we'll give you
siriusCapping.config.userIdstringThe ID of the user, that you can write encrypted or hashed
siriusCapping.config.modestringTwo modes are available, reading (default) and device
siriusCapping.config.toleranceintThe number of devices that can be used at the same time

Note: Declaring siriusCapping.config.brand and siriusCapping.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 the same time with USER 1 account.
  • USER 3 wants to read an article at the 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

You are responsible for building the UI that blocks content when a simultaneous reading is detected. Here is an example of how you can do it, by adding the following lines in your html, wherever you want.

<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="siriusCapping.continueReading()">Continue reading</a>
</div>
  • siriusCapping.continueReading(): This function is defined by JavaScript SDK and allows you to restart Capping when a user is blocked.
  • siriusCapping.stop(): Besides, if you want to stop Capping for any reason, you can siriusCapping.stop() function anywhere, then use siriusCapping.continueReading() to restart Capping

Then, add following lines into your html, just before the closing body tag. This JavaScript SDK integration launch tracking of simultaneous readings, and will execute showPopinFunction when a simultaneous reading is detected. Defining showPopinFunction obliges you to define hidePopinFunction as well, because a popin must appear when a simultaneous reading is detected, but it must also disappear at the right time.

<script>
var siriusCapping = window.siriusCapping || {};
siriusCapping.config = {
brand: "<BRAND_UUID>", //mandatory
userId: "<THE_USER_ID>", //mandatory
mode: "device",
tolerance: 2, //default: 1
// showPopinFunction function helps you to display something to block reading
// It is just an example, feel free to change it as you want
showPopinFunction: function () {
x = document.getElementById("capping");
x.style.display = "block";
},
// hidePopinFunction function helps you to hide the previous showed popin
hidePopinFunction: function () {
x = document.getElementById("capping");
x.style.display = "none";
},
};
</script>
<script async src="https://capping.sirius.press/sdk.v1.1.0.js"></script>
ParamTypeDescription
siriusCapping.config.brandstringA brand uuid that we'll give you
siriusCapping.config.userIdstringThe ID of the user, that you can write encrypted or hashed
siriusCapping.config.modestringTwo modes are available, reading (default) and device
siriusCapping.config.toleranceintThe number of devices that can be used at the same time
siriusCapping.config.showPopinFunctionfunctionThis function will be called when a simultaneous reading is detected. It helps you to display messages, popin, banner...
siriusCapping.config.hidePopinFunctionfunctionThis function will be called when a simultaneous reading is released, or when you use siriusCapping.continueReading()

Track conversions

Your popin will help generate conversions or upsell. To reconcile your conversions with popin displays, you can ask Capping SDK to only collect a conversion (without launching any simultaneous reading tracking). For example, here's how to do it on your purchase confirmation page.

<script>
var siriusCapping = window.siriusCapping || {};
siriusCapping.config = {
brand: "<BRAND_UUID>", //mandatory
userId: "<THE_USER_ID>", //mandatory
mode: "conversion",
};
</script>
<script async src="https://capping.sirius.press/sdk.v1.1.0.js"></script>
Edit this page on GitHub