Event tracking

Track events and user activity in real time.

Javascript

The Javascript integration provides events and functions that allow you to monitor the current state of simultaneous readings in real time.

Simultaneous Reading Count

Track the number of simultaneous readings for a user:

Event

window.addEventListener("capping:simultaneousReadingCount", (e) => {
  console.log("Simultaneous readings:", e.detail.count);
});

Getters

const count = siriusCapping.getSimultaneousReadingCount();
// returns a number or null if mode is not 'reading'

Connected Device Count

Track the number of connected devices for a user:

Event

window.addEventListener("capping:connectedDeviceCount", (e) => {
  console.log("Connected devices:", e.detail.count);
});

Getter

const count = siriusCapping.getConnectedDeviceCount();
// returns a number or null if mode is not 'device'

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>

iOS

In order to track events on iOS you can use the trackEvent method.

Available events:

public enum CappingEvent: String
{
    case conversion
    case popinDisplayed
}

// Example for conversion event:

self.cappingService.trackEvent(.conversion)

Android

In order to track events on Android you can use the trackEvent method.

Available events:

enum class CappingEvent(val nameEvent: String) {
    CONVERSION("conversion"),
    POPIN_DISPLAYED("popinDisplayed")
}

// Example for conversion event:

this.capping.trackEvent(CappingEvent.CONVERSION)