POST /api/v1/client-api/metrics/analytics/

Recuperar datos de análisis

Recupera datos de análisis para obtener información sobre el comportamiento del usuario y las métricas de rendimiento para su uso posterior en gráficos.

Los ingresos de este endpoint son basados en eventos: cada valor se atribuye a la fecha de la transacción — el día en que ocurrió la compra, renovación o reembolso. Para atribuir los ingresos a la fecha de instalación de cada usuario (por ejemplo, para conciliar con Ads Manager), utilice el endpoint de cohorte (POST /api/v1/client-api/metrics/cohort/).

Límite de velocidad: 2 solicitudes por segundo.

Request body

chart_idstringrequired

Especifica el gráfico que necesitas. Solo puedes especificar un tipo de gráfico en cada solicitud.

One of: "revenue", "mrr", "arr", "arppu", "subscriptions_active", "subscriptions_new", "subscriptions_renewal_cancelled", "subscriptions_expired", "trials_active", "trials_new", "trials_renewal_cancelled", "trials_expired", "grace_period", "billing_issue", "refund_events", "refund_money", "non_subscriptions", "arpu", "installs"

filtersobjectrequired
datearray of stringrequired

Introduce la fecha o el período de tiempo para el que deseas recuperar los datos del gráfico

compare_datearray of string

Introduce la fecha o el período de tiempo de comparación

storearray of string

Filtra por el store donde se realizó la compra

countryarray of string

Filtra por el código de país de 2 letras donde se realizó la compra

store_product_idarray of string

ID de producto cualificado por store, con el formato <store>:<product_id> — por ejemplo app_store:premium_monthly o play_store:premium_sub:monthly-base-plan para una suscripción de Google con un plan base. Se rechaza un ID de producto sin prefijo de store.

durationarray of string

Especifica la duración de la suscripción

attribution_sourcearray of string

La integración de origen para la atribución

attribution_statusarray of string

Indica si la atribución es orgánica o no orgánica

attribution_channelarray of string

Canal de marketing que originó la transacción

attribution_campaignarray of string

Campaña de marketing que originó la transacción

attribution_adgrouparray of string

Grupo de anuncios de atribución que originó la transacción

attribution_adsetarray of string

Conjunto de anuncios de atribución que originó la transacción

attribution_creativearray of string

Elementos visuales o de texto específicos de un anuncio o campaña cuyo seguimiento se realiza para medir su efectividad

offer_categoryarray of string

Especifica las categorías de oferta para las que deseas recuperar datos

offer_typearray of string

Especifica los tipos de oferta para los que deseas recuperar datos

offer_idarray of string

Especifica las ofertas concretas para las que deseas recuperar datos

period_unitstring

Especifica el intervalo de tiempo para agregar los datos de análisis

One of: "day", "week", "month", "quarter", "year"

date_typestring

Especifica qué fecha debe tratarse como fecha de incorporación del usuario

One of: "purchase_date", "profile_install_date"

segmentationstring

Establece la base para la segmentación

formatstring

Especifica el formato del archivo de exportación

One of: "json", "csv"

Responses

Datos de análisis recuperados correctamente

Schema

Respuesta que contiene datos de análisis para el tipo de gráfico solicitado

dataobject

Objeto que contiene diferentes tipos de métricas (revenue, proceeds, net_revenue, etc.)

Example
{
  "data": {
    "revenue": {
      "data": [],
      "value": 0,
      "value_from": null,
      "value_to": null,
      "compare_value_from": null,
      "compare_value_to": null,
      "title": "revenue",
      "type": "multi",
      "default_aggregation": "sum",
      "description": "<div>Total money received from both subscriptions and one-time purchases. Does not include\nrevenue from subscriptions and purchases that were refunded afterward. Calculated before the store's fee.<br />\nFor example, there were 5 monthly $10 subs, 1 yearly $100 sub and 10 one-time $50 purchases today,<br />\nrevenue = 5*$10 + 1*$100 + 10*$50 = $650</div>",
      "metric_name": "Revenue",
      "is_json": true,
      "unit": "USD",
      "recommended_period": null
    },
    "proceeds": {
      "data": [],
      "value": 0,
      "value_from": null,
      "value_to": null,
      "compare_value_from": null,
      "compare_value_to": null,
      "title": "revenue",
      "type": "multi",
      "default_aggregation": "sum",
      "description": "<div>Total money received from both subscriptions and one-time purchases. Does not include\nrevenue from subscriptions and purchases that were refunded afterward. Calculated before the store's fee.<br />\nFor example, there were 5 monthly $10 subs, 1 yearly $100 sub and 10 one-time $50 purchases today,<br />\nrevenue = 5*$10 + 1*$100 + 10*$50 = $650</div>",
      "metric_name": "Revenue",
      "is_json": true,
      "unit": "USD",
      "recommended_period": null
    },
    "net_revenue": {
      "data": [],
      "value": 0,
      "value_from": null,
      "value_to": null,
      "compare_value_from": null,
      "compare_value_to": null,
      "title": "revenue",
      "type": "multi",
      "default_aggregation": "sum",
      "description": "<div>Total money received from both subscriptions and one-time purchases. Does not include\nrevenue from subscriptions and purchases that were refunded afterward. Calculated before the store's fee.<br />\nFor example, there were 5 monthly $10 subs, 1 yearly $100 sub and 10 one-time $50 purchases today,<br />\nrevenue = 5*$10 + 1*$100 + 10*$50 = $650</div>",
      "metric_name": "Revenue",
      "is_json": true,
      "unit": "USD",
      "recommended_period": null
    }
  }
}

Solicitud incorrecta

Schema
errorsarray of object
sourcestring
errorsarray of string
error_codestring
status_codeinteger

No autorizado

Schema
errorsarray of object
sourcestring
errorsarray of string
error_codestring
status_codeinteger

Límite de velocidad superado. Máximo 2 solicitudes por segundo por clave de API.