> For the complete documentation index, see [llms.txt](https://ajuda.rnp.br/eduplay/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://ajuda.rnp.br/eduplay/video-sob-demanda/manual-de-integracoes/envio-de-estatisticas-a-partir-de-player-externo/estatisticas-gerais.md).

# Estatísticas gerais

<mark style="color:green;">`POST`</mark> `https://eduplay.rnp.br/collector/sendData`

#### Query Parameters

| Name                                  | Type    | Description                                                                                                                                                                                                                                           |
| ------------------------------------- | ------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| v<mark style="color:red;">\*</mark>   | Long    | identificador de versão de vídeo ou áudio. Quando não se aplicar enviar o valor <mark style="color:red;">`0`</mark> (zero) nesse parâmetro                                                                                                            |
| s<mark style="color:red;">\*</mark>   | String  | identificador da sessão do usuário                                                                                                                                                                                                                    |
| t<mark style="color:red;">\*</mark>   | String  | tipo de requisição enviar sempre o valor como <mark style="color:red;">`web`</mark>                                                                                                                                                                   |
| a<mark style="color:red;">\*</mark>   | Long    | identificador numérico da aplicação que está enviando a informação de estatísticas                                                                                                                                                                    |
| e<mark style="color:red;">\*</mark>   | Integer | flag para definir se é embed (valor <mark style="color:red;">`1`</mark>) ou não (valor <mark style="color:red;">`0`</mark>)                                                                                                                           |
| u<mark style="color:red;">\*</mark>   | Long    | identificador numérico do usuário que realizou o acesso. Se for um acesso anônimo enviar o valor padrão <mark style="color:red;">`0`</mark> (zero)                                                                                                    |
| i<mark style="color:red;">\*</mark>   | Long    | identificador numéricodo conteúdo acessado                                                                                                                                                                                                            |
| ct<mark style="color:red;">\*</mark>  | Integer | tipo do conteúdo                                                                                                                                                                                                                                      |
| tt<mark style="color:red;">\*</mark>  | Integer | subtipo do conteúdo                                                                                                                                                                                                                                   |
| p<mark style="color:red;">\*</mark>   | Long    | identificador da playlist ou podcast. Aplicável apenas para reprodução de conteúdos da playlist ou podcast em sequência. Caso contrário enviar o valor como <mark style="color:red;">`0`</mark> (zero).                                               |
| pt<mark style="color:red;">\*</mark>  | Integer | aplicável apenas quando o parâmetro p é diferente de <mark style="color:red;">`0`</mark> (zero). Enviar valor <mark style="color:red;">`2`</mark> para definir que é playlist e valor <mark style="color:red;">`7`</mark> para definir que é podcast. |
| ts<mark style="color:red;">\*</mark>  | Long    | timestamp da estatística                                                                                                                                                                                                                              |
| tsz<mark style="color:red;">\*</mark> | Integer | timezone associado ao timestamp                                                                                                                                                                                                                       |

Para o parâmetro <mark style="color:red;">`ct`</mark> (tipo de conteúdo), os valores possíveis são:

* <mark style="color:red;">`1`</mark>: Vídeo sob demanda
* <mark style="color:red;">`2`</mark>: Vídeo ao vivo
* <mark style="color:red;">`7`</mark>: Playlist, podcast ou canal
* <mark style="color:red;">`8`</mark>: TV ou rádio
* <mark style="color:red;">`11`</mark>: Áudio sob demanda ou ao vivo

O parâmetro <mark style="color:red;">`tt`</mark> (subtipo de conteúdo) é aplicavél apenas quando o <mark style="color:red;">`ct`</mark> igual a <mark style="color:red;">`7`</mark>, <mark style="color:red;">`8`</mark> ou <mark style="color:red;">`9`</mark>. Os valores possíveis são:

* Para <mark style="color:red;">`ct = 7`</mark>: <mark style="color:red;">`2`</mark> para playlist, <mark style="color:red;">`4`</mark> para canal e <mark style="color:red;">`7`</mark> para podcast;
* Para <mark style="color:red;">`ct = 8`</mark>: <mark style="color:red;">`1`</mark> para TV e <mark style="color:red;">`2`</mark> para rádio;
* Para <mark style="color:red;">`ct = 11`</mark>:  <mark style="color:red;">`1`</mark> para áudio sob demanda e <mark style="color:red;">`2`</mark> para áudio ao vivo.

No corpo da requisição deve ser enviado, em formato **json**, a informação da estátistica que deseja armazenar:

* <mark style="color:red;">`{"ref":""}`</mark>: enviar no momento que o player começou a reproduzir o conteúdo. **ref** é a URL a partir da qual o player foi chamado. Se não se aplicar pode enviar o valor vazio.
* <mark style="color:red;">`{"int":<intervalo assistido>}`</mark>: enviar conforme o usuário assistir o conteúdo para informar qual trecho do conteúdo foi reproduzido. Deve ser enviado um valor inteiro no intervalo de <mark style="color:red;">`0 a 8`</mark>, sendo que <mark style="color:red;">`0`</mark> é o início do conteúdo e <mark style="color:red;">`8`</mark> significa que assistiu até o final.
* <mark style="color:red;">`{ "ls": 1 }`</mark>: enviar se detectar que o usuário abandonou o conteúdo reproduzindo e foi para outra aba e/ou navegador.
* <mark style="color:red;">`{"sp": <velocidade média do usuário em Kbps>}`</mark>: idealmente enviar apenas uma vez por sessão do usuário qual a velocidade média da rede em que ele está conectado.
* <mark style="color:red;">`{"sh": <onde foi compartilhado>}`</mark>: enviar informação de interação com conteúdo seja curtida ou compartilhamento. Valores possíveis:&#x20;
  * <mark style="color:red;">`1`</mark>: Compartilhar por e-mail
  * <mark style="color:red;">`2`</mark>: Curtir
  * <mark style="color:red;">`101`</mark>: Twitter
  * <mark style="color:red;">`102`</mark>: Facebook
  * <mark style="color:red;">`104`</mark>: WhatsApp


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://ajuda.rnp.br/eduplay/video-sob-demanda/manual-de-integracoes/envio-de-estatisticas-a-partir-de-player-externo/estatisticas-gerais.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
