Skip to main content

Lura Analytics

Lura Analytics automatically tracks playback metrics, viewer behavior, performance data, ad activity, device information, content information, and playback errors.

Quick Start​

To enable Lura Analytics, set the analytics configuration at the top level of your player configuration.

Enable Lura Analytics
const config = {
...
analytics: {
enabled: true,
host: "https://player-analytics.mp.lura.live",
apiKey: "sample-api-key"
},
...
};

const player = new lura.Player(document.getElementById("player"));
player.setConfig(config);

Lura Analytics is enabled only when enabled is true, host is a valid HTTPS URL, and apiKey is valid. Payloads are sent every period seconds. When period is not specified, the player uses 10 seconds.

Configuration Options​

Custom Period​

analytics: {
enabled: true,
host: "https://player-analytics.mp.lura.live",
apiKey: "sample-api-key",
period: 20
}

App Information​

analytics: {
enabled: true,
host: "https://player-analytics.mp.lura.live",
apiKey: "sample-api-key",
app: {
id: "sample-app-id",
name: "Sample App",
version: "1.0.0"
}
}

Custom Session Data​

analytics: {
enabled: true,
host: "https://player-analytics.mp.lura.live",
apiKey: "sample-api-key",
session: {
data: "sample-session-data",
userId: "sample-user-id"
}
}