# Statistics

The Statistics Endpoint allows you to query all statistical Data from all nexxOMNIA/nexxPLAY Environments by API. All Endpoints return an Object with "**day**" as Key and "**KPI**" as Value, unless otherwise indicated.

{% hint style="info" %}
Please notice, that this Endpoint uses a different Set of Parameters as the usual Media Endpoints. Please make sure, that the mandatory Parameters are set.

You will find the full List of Parameters for all Statistic Endpoints at the End of this Section.
{% endhint %}

## Media Performance

## /displaysbyday

<mark style="color:blue;">`GET`</mark> `https://api.nexx.cloud/v3.1/statistics/displaysbyday`

{% tabs %}
{% tab title="200 " %}

```
```

{% endtab %}
{% endtabs %}

## /playerstartsbyday

<mark style="color:blue;">`GET`</mark> `https://api.nexx.cloud/v3.1/statistics/playerstartsbyday`

{% tabs %}
{% tab title="200 " %}

```
```

{% endtab %}
{% endtabs %}

## /viewsbyday

<mark style="color:blue;">`GET`</mark> `https://api.nexx.cloud/v3.1/statistics/viewsbyday`

{% tabs %}
{% tab title="200 " %}

```
```

{% endtab %}
{% endtabs %}

## /downloadsbyday

<mark style="color:blue;">`GET`</mark> `https://api.nexx.cloud/v3.1/statistics/downloadsbyday`

{% tabs %}
{% tab title="200 " %}

```
```

{% endtab %}
{% endtabs %}

## /clicksbyday

<mark style="color:blue;">`GET`</mark> `https://api.nexx.cloud/v3.1/statistics/clicksbyday`

{% tabs %}
{% tab title="200 " %}

```
```

{% endtab %}
{% endtabs %}

{% hint style="info" %}
You can replace "**byday**" for Displays, PlayerStarts, Views, Downloads and Clicks with "**byhour**" or "**byweekday**" if you need the Results to be grouped by the respective timeframe.
{% endhint %}

## /viewsexternalbyday

<mark style="color:blue;">`GET`</mark> `https://api.nexx.cloud/v3.1/statistics/viewsexternalbyday`

{% tabs %}
{% tab title="200 " %}

```
```

{% endtab %}
{% endtabs %}

## /viewtimebyday

<mark style="color:blue;">`GET`</mark> `https://api.nexx.cloud/v3.1/statistics/viewtimebyday`

the returned KPI is the absolute View Time (in Minutes)

{% tabs %}
{% tab title="200 " %}

```
```

{% endtab %}
{% endtabs %}

## /viewtimeaveragebyday

<mark style="color:blue;">`GET`</mark> `https://api.nexx.cloud/v3.1/statistics/viewtimeaveragebyday`

the returned KPI is the average View Time (in Minutes)

{% tabs %}
{% tab title="200 " %}

```
```

{% endtab %}
{% endtabs %}

## /viewprogressbyday

<mark style="color:blue;">`GET`</mark> `https://api.nexx.cloud/v3.1/statistics/viewprogressbyday`

the returned KPI is an Object with the predefined Progress Slides per Day

{% tabs %}
{% tab title="200 " %}

```
```

{% endtab %}
{% endtabs %}

## /itemlist

<mark style="color:blue;">`GET`</mark> `https://api.nexx.cloud/v3.1/statistics/itemlist`

the returned KPI is an Object with Media ID as Key and KPI Value as Value. The Result Set will include all Media Items, that had a Performance > 0 on that KPI of the given Period.

#### Path Parameters

| Name | Type   | Description                                                                                                                                                                                  |
| ---- | ------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| kpi  | string | the target KPI \[display, playerstart, view, viewtime, viewtimeaverage, viewexternal, download, click, progress25, progress50, progress75, progress95, progress100, adrequest, adimpression] |

{% tabs %}
{% tab title="200 " %}

```
```

{% endtab %}
{% endtabs %}

## Charts

The Chart Endpoints return an Object with **Media ID** as Key and **KPI** as Value.

## /chartsbydisplays

<mark style="color:blue;">`GET`</mark> `https://api.nexx.cloud/v3.1/statistics/chartsbydisplays`

{% tabs %}
{% tab title="200 " %}

```
```

{% endtab %}
{% endtabs %}

## /chartsbyplayerstarts

<mark style="color:blue;">`GET`</mark> `https://api.nexx.cloud/v3.1/statistics/chartsbyplayerstarts`

{% tabs %}
{% tab title="200 " %}

```
```

{% endtab %}
{% endtabs %}

## /chartsbyviews

<mark style="color:blue;">`GET`</mark> `https://api.nexx.cloud/v3.1/statistics/chartsbyviews`

{% tabs %}
{% tab title="200 " %}

```
```

{% endtab %}
{% endtabs %}

## /chartsbyviewsexternal

<mark style="color:blue;">`GET`</mark> `https://api.nexx.cloud/v3.1/statistics/chartsbyviewsexternal`

{% tabs %}
{% tab title="200 " %}

```
```

{% endtab %}
{% endtabs %}

## /chartsbyviewtime

<mark style="color:blue;">`GET`</mark> `https://api.nexx.cloud/v3.1/statistics/chartsbyviewtime`

{% tabs %}
{% tab title="200 " %}

```
```

{% endtab %}
{% endtabs %}

## /chartsbyviewtimeaverage

<mark style="color:blue;">`GET`</mark> `https://api.nexx.cloud/v3.1/statistics/chartsbyviewtimeaverage`

{% tabs %}
{% tab title="200 " %}

```
```

{% endtab %}
{% endtabs %}

## /chartsbycompletion

<mark style="color:blue;">`GET`</mark> `https://api.nexx.cloud/v3.1/statistics/chartsbycompletion`

{% tabs %}
{% tab title="200 " %}

```


```

{% endtab %}
{% endtabs %}

## /chartsbydownloads

<mark style="color:blue;">`GET`</mark> `https://api.nexx.cloud/v3.1/statistics/chartsbydownloads`

{% tabs %}
{% tab title="200 " %}

```
```

{% endtab %}
{% endtabs %}

## /chartsbyclicks

<mark style="color:blue;">`GET`</mark> `https://api.nexx.cloud/v3.1/statistics/chartsbyclicks`

#### Path Parameters

| Name | Type   | Description |
| ---- | ------ | ----------- |
|      | string |             |

{% tabs %}
{% tab title="200 " %}

```
```

{% endtab %}
{% endtabs %}

## Distribution

The Distribution Endpoints return an Object with Distribution Item (for exmaple, Country Code) as Key and Number of Occurences as Value.

## /distributionbygateway

<mark style="color:blue;">`GET`</mark> `https://api.nexx.cloud/v3.1/statistics/distributionbygateway`

{% tabs %}
{% tab title="200 " %}

```
```

{% endtab %}
{% endtabs %}

## /distributionbydevice

<mark style="color:blue;">`GET`</mark> `https://api.nexx.cloud/v3.1/statistics/distributionbydevice`

{% tabs %}
{% tab title="200 " %}

```
```

{% endtab %}
{% endtabs %}

## /distributionbyos

<mark style="color:blue;">`GET`</mark> `https://api.nexx.cloud/v3.1/statistics/distributionbyos`

{% tabs %}
{% tab title="200 " %}

```
```

{% endtab %}
{% endtabs %}

## /distributionbybrowser

<mark style="color:blue;">`GET`</mark> `https://api.nexx.cloud/v3.1/statistics/distributionbybrowser`

{% tabs %}
{% tab title="200 " %}

```
```

{% endtab %}
{% endtabs %}

## /distributionbydeliverydomain

<mark style="color:blue;">`GET`</mark> `https://api.nexx.cloud/v3.1/statistics/distributionbydeliverydomain`

{% tabs %}
{% tab title="200 " %}

```
```

{% endtab %}
{% endtabs %}

## /distributionbyslug

<mark style="color:blue;">`GET`</mark> `https://api.nexx.cloud/v3.1/statistics/distributionbyslug`

{% tabs %}
{% tab title="200 " %}

```
```

{% endtab %}
{% endtabs %}

## /distributionbypodcastapp

<mark style="color:blue;">`GET`</mark> `https://api.nexx.cloud/v3.1/statistics/distributionbypodcastapp`

{% tabs %}
{% tab title="200 " %}

```
```

{% endtab %}
{% endtabs %}

## /distributionbycountry

<mark style="color:blue;">`GET`</mark> `https://api.nexx.cloud/v3.1/statistics/distributionbycountry`

{% tabs %}
{% tab title="200 " %}

```
```

{% endtab %}
{% endtabs %}

## /distributionbychannel

<mark style="color:blue;">`GET`</mark> `https://api.nexx.cloud/v3.1/statistics/distributionbychannel`

{% tabs %}
{% tab title="200 " %}

```
```

{% endtab %}
{% endtabs %}

## /distributionbyformat

<mark style="color:blue;">`GET`</mark> `https://api.nexx.cloud/v3.1/statistics/distributionbyformat`

{% tabs %}
{% tab title="200 " %}

```
```

{% endtab %}
{% endtabs %}

## /distributionbylicensor

<mark style="color:blue;">`GET`</mark> `https://api.nexx.cloud/v3.1/statistics/distributionbylicensor`

{% tabs %}
{% tab title="200 " %}

```
```

{% endtab %}
{% endtabs %}

## RealTime Performance

The RealTime Endpoints will return an Object with Performance KPIs per **Gateway** (or per **Media ID** in case of the RealTime Chart Endpoints) for the given Period.

{% hint style="info" %}
The RealTime Endpoints will not respect any of the given Standard Statistics Parameters below (except "**streamtype**").
{% endhint %}

## /realtime

<mark style="color:blue;">`GET`</mark> `https://api.nexx.cloud/v3.1/statistics/realtime`

#### Query Parameters

| Name      | Type    | Description                                                                                                                  |
| --------- | ------- | ---------------------------------------------------------------------------------------------------------------------------- |
| timeFrame | integer | the desired Timeframe to group the Deliveries by. Computed in Minutes backwards from now \[5, 10, 15, 30, 60, 120, 180, 240] |
| limit     | integer | return only the most active LIMIT Elements                                                                                   |

{% tabs %}
{% tab title="200 " %}

```
```

{% endtab %}
{% endtabs %}

## /realtimeexternal

<mark style="color:blue;">`GET`</mark> `https://api.nexx.cloud/v3.1/statistics/realtimeexternal`

#### Query Parameters

| Name      | Type    | Description                                                                                                                  |
| --------- | ------- | ---------------------------------------------------------------------------------------------------------------------------- |
| timeFrame | integer | the desired Timeframe to group the Deliveries by. Computed in Minutes backwards from now \[5, 10, 15, 30, 60, 120, 180, 240] |
| limit     | integer | return only the most active LIMIT Elements                                                                                   |

{% tabs %}
{% tab title="200 " %}

```
```

{% endtab %}
{% endtabs %}

## /realtimecharts

<mark style="color:blue;">`GET`</mark> `https://api.nexx.cloud/v3.1/statistics/realtimecharts`

#### Query Parameters

| Name      | Type    | Description                                                                                                                  |
| --------- | ------- | ---------------------------------------------------------------------------------------------------------------------------- |
| timeFrame | integer | the desired Timeframe to group the Deliveries by. Computed in Minutes backwards from now \[5, 10, 15, 30, 60, 120, 180, 240] |
| limit     | integer | return only the most active LIMIT Elements                                                                                   |

{% tabs %}
{% tab title="200 " %}

```
```

{% endtab %}
{% endtabs %}

## /realtimechartsexternal

<mark style="color:blue;">`GET`</mark> `https://api.nexx.cloud/v3.1/statistics/realtimechartsexternal`

#### Query Parameters

| Name      | Type    | Description                                                                                                                  |
| --------- | ------- | ---------------------------------------------------------------------------------------------------------------------------- |
| timeFrame | integer | the desired Timeframe to group the Deliveries by. Computed in Minutes backwards from now \[5, 10, 15, 30, 60, 120, 180, 240] |
| limit     | integer | return only the most active LIMIT Elements                                                                                   |

{% tabs %}
{% tab title="200 " %}

```
```

{% endtab %}
{% endtabs %}

## Ad Performance

## /adrequestsbyday

<mark style="color:blue;">`GET`</mark> `https://api.nexx.cloud/v3.1/statistics/adrequestsbyday`

{% tabs %}
{% tab title="200 " %}

```
```

{% endtab %}
{% endtabs %}

## /adimpressionsbyday

<mark style="color:blue;">`GET`</mark> `https://api.nexx.cloud/v3.1/statistics/adimpressionsbyday`

{% tabs %}
{% tab title="200 " %}

```
```

{% endtab %}
{% endtabs %}

## /adclicksbyday

<mark style="color:blue;">`GET`</mark> `https://api.nexx.cloud/v3.1/statistics/adclicksbyday`

{% tabs %}
{% tab title="200 " %}

```
```

{% endtab %}
{% endtabs %}

## /aderrorsbyday

<mark style="color:blue;">`GET`</mark> `https://api.nexx.cloud/v3.1/statistics/aderrorsbyday`

{% tabs %}
{% tab title="200 " %}

```
```

{% endtab %}
{% endtabs %}

{% hint style="info" %}
You can replace "**byday**" in all Cases with "**byhour**" or "**byweekday**" if you need the Results to be grouped by the respective timeframe.
{% endhint %}

## User / Session Performance

## /registrationsbyday

<mark style="color:blue;">`GET`</mark> `https://api.nexx.cloud/v3.1/statistics/registationsbyday`

#### Query Parameters

| Name     | Type   | Description                                                                       |
| -------- | ------ | --------------------------------------------------------------------------------- |
| provider | string | only return Registrations of the given Provider \[facebook, google, twitter, aad] |

{% tabs %}
{% tab title="200 " %}

```
```

{% endtab %}
{% endtabs %}

## /loginsbyday

<mark style="color:blue;">`GET`</mark> `https://api.nexx.cloud/v3.1/statistics/loginsbyday`

#### Query Parameters

| Name     | Type   | Description                                                                 |
| -------- | ------ | --------------------------------------------------------------------------- |
| provider | string | only return Logins via the given Provider \[facebook, google, twitter, aad] |

{% tabs %}
{% tab title="200 " %}

```
```

{% endtab %}
{% endtabs %}

## Payment Performance

## /revenuebyday

<mark style="color:blue;">`GET`</mark> `https://api.nexx.cloud/v3.1/statistics/revenuebyday`

#### Query Parameters

| Name | Type   | Description                                                                                         |
| ---- | ------ | --------------------------------------------------------------------------------------------------- |
| type | string | only include Sales of a specific Type into the Amount \[subscription, rebill, ppv, ownage, deposit] |

{% tabs %}
{% tab title="200 " %}

```
```

{% endtab %}
{% endtabs %}

## /subscriptionsbyday

<mark style="color:blue;">`GET`</mark> `https://api.nexx.cloud/v3.1/statistics/subscriptionsbyday`

the returned KPI is "active Subscriptions" (total) on any given Day

#### Query Parameters

| Name              | Type    | Description                                        |
| ----------------- | ------- | -------------------------------------------------- |
| onlyPremium       | boolean | only return Premium Subscriptions                  |
| onlyStandard      | boolean | only return Standard Subscriptions                 |
| excludeTerminated | boolean | only return not-terminated/cancelled Subscriptions |

{% tabs %}
{% tab title="200 " %}

```
```

{% endtab %}
{% endtabs %}

## /subscriptionterminationsbyday

<mark style="color:blue;">`GET`</mark> `https://api.nexx.cloud/v3.1/statistics/subscriptionterminationsbyday`

#### Query Parameters

| Name   | Type   | Description                                                                                                                        |
| ------ | ------ | ---------------------------------------------------------------------------------------------------------------------------------- |
| reason | string | only return Terminations, that were processed due to the given reason \[byuser, incms, inappapi, rechargeproblem, paymentcanceled] |

{% tabs %}
{% tab title="200 " %}

```
```

{% endtab %}
{% endtabs %}

## Special Parameters

| Parameter                 | Values                                                                                                | Description                                                                                                                                                                              |
| ------------------------- | ----------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **includeNetworkDomains** | \[0, 1]                                                                                               | if the calling Domain is Network Domain, and all Results from all Network Domains shall be combined, set this Parameter to 1                                                             |
| **streamtype**            | Streamtype                                                                                            | the target Media Streamtype **(mandatory)**                                                                                                                                              |
| **from**                  | Date (YYYY-MM-DD)                                                                                     | Starting Day of the Analysis **(mandatory)**                                                                                                                                             |
| **to**                    | Date (YYYY-MM-DD)                                                                                     | End Day of the Analysis **(mandatory)**                                                                                                                                                  |
| **gateway**               | \[desktop, mobile, amp, fbia, tablet, ios, android, smarttv, androidtv, podcast]                      | The Analysis will only respect Results from this Gateway.                                                                                                                                |
| **timezone**              | TimeZone Name                                                                                         | The Analysis will consider from/to and Day Borders as Dates in the given Timezone. If skipped, the Domain Default Timezone will be used.                                                 |
| **device**                | \[pc, mobile, tablet, tv, smart]                                                                      | The Analysis will only respect Results by items of this Device Type                                                                                                                      |
| **item**                  | int                                                                                                   | The Analysis will focus only on a specific Media item (if item is set, and streamtype is set to "**allmedia**", item will be interpreted as GlobalID)                                    |
| **itemReference**         | \[ID, GID, hash, refnr, externalReference]                                                            | If Media Items are used as Keys for the Result Items, by default, their "ID" is returned. Setting this Parameter to another Item Property will change this Key to the desired Attribute. |
| **limit**                 | int                                                                                                   | in contrast to the Media API, the limit can be set on this Endpoint to 100.000 if necessary. This can make sense on all Methods, that return long lists of Media Items.                  |
| **channel**               | int                                                                                                   | The Analysis will only respect Results in this Channel                                                                                                                                   |
| **format**                | int                                                                                                   | The Analysis will only respect Results in this Format                                                                                                                                    |
| **deliveryPartner**       | int                                                                                                   | The Analysis will only respect Results from this Delivery Partner                                                                                                                        |
| **affiliatePartner**      | int                                                                                                   | The Analysis will only respect Results from this Affiliate Partner                                                                                                                       |
| **campaign**              | int                                                                                                   | The Analysis will only respect Results from this Campaign                                                                                                                                |
| **licensor**              | int                                                                                                   | The Analysis will only respect Results by items of this Licensor                                                                                                                         |
| **platformVariant**       | string                                                                                                | The Analysis will onyl respect Results on the given platformVariant                                                                                                                      |
| **pageIntegration**       | \[js, embed, wc, native]                                                                              | The Analysis will only respect Results by items of Media, that was included by this Type of integration.                                                                                 |
| **browser**               | \[firefox, chrome, edge, explorer, safari, opera, samsung browser]                                    | The Analysis will only respect Results by Media, that was delivered on the given Browser                                                                                                 |
| **os**                    | \[windows, macOS, linux, ios, android, chromeOS]                                                      | The Analysis will only respect Results by Media, that was delivered on the given Operating System                                                                                        |
| **countryCode**           | 2-Letter Country Code                                                                                 | The Analysis will only respect Results by Media, that was delivered in the given Country                                                                                                 |
| **subdivisionCode**       | String                                                                                                | The Analytics will only respect Results by Media, that was delivered in the given Country Subdivision                                                                                    |
| **manufacturer**          | String                                                                                                | The Analysis will only respect Results by Media, that was delivered by Devices from the given Manufacturer.                                                                              |
| **deliveryDomain**        | String                                                                                                | The Analysis will only respect Results by Media, that was delivered on the given Domain                                                                                                  |
| **consentEnvironment**    | \[none, onlystring, 1, 2]                                                                             | The Analysis will only respect Results by Media, that were delivered in the given User Consent Environment                                                                               |
| **playbackMode**          | \[bumper, preview, pseudolive, scenesplit, story, presentation, endless, premiere, mini, micro, hero] | The Analysis will only respect Results by Media, that was delivered in this PlaybackMode                                                                                                 |
| **dataMode**              | \[api, static, offline]                                                                               | The Analysis will only respect Results by Media, that was delivered in this DataMode                                                                                                     |
| **mediaOrigin**           | \[own, remote]                                                                                        | The Analysis will only respect Results by Media, that are managed by nexxOMNIA (or are Remote Media)                                                                                     |
| **startCondition**        | \[autoplay, autoplaymuted, manual, manualmuted]                                                       | The Analysis will only respect Results by Media, that was started as defined.                                                                                                            |
| **viewCount**             | \[onlyfirst, afterfirst]                                                                              | The Analysis will only respect Results, where the View was the initial Media in the Player ("onlyfirst") or came later ("afterfirst")                                                    |
