Organiza tus páginas con colecciones
Guarda y categoriza el contenido según tus preferencias.
Manejar la respuesta de un informe no es trivial, en especial si deseas que tu solución sea flexible e independiente de las dimensiones y métricas reales que elegiste en el informe.
Por suerte, la respuesta del informe es bastante completa e incluye mucha información útil.
Encabezados
Puedes usar la información que se muestra en los encabezados para elegir cómo dar formato a una métrica en particular. Incluye información sobre el tipo de métrica, si es una moneda, una proporción o un recuento, por ejemplo, y en qué moneda se utiliza, si es un valor monetario.
Aquí es donde puede obtener los resultados reales del informe. Cada fila de respuesta representa una fila de informe, que tiene un significado diferente según las dimensiones que elegiste.
[[["Fácil de comprender","easyToUnderstand","thumb-up"],["Resolvió mi problema","solvedMyProblem","thumb-up"],["Otro","otherUp","thumb-up"]],[["Falta la información que necesito","missingTheInformationINeed","thumb-down"],["Muy complicado o demasiados pasos","tooComplicatedTooManySteps","thumb-down"],["Desactualizado","outOfDate","thumb-down"],["Problema de traducción","translationIssue","thumb-down"],["Problema con las muestras o los códigos","samplesCodeIssue","thumb-down"],["Otro","otherDown","thumb-down"]],["Última actualización: 2025-07-26 (UTC)"],[[["\u003cp\u003eAdSense report responses provide comprehensive data including headers for metric formatting, rows for results, and totals/averages for calculations.\u003c/p\u003e\n"],["\u003cp\u003eHeaders specify the type and currency of each metric, enabling adaptable handling of report data.\u003c/p\u003e\n"],["\u003cp\u003eReport rows contain the actual values for each dimension and metric selected in the report.\u003c/p\u003e\n"],["\u003cp\u003eTotals and averages are included, with ratios only having an average returned in the totals array.\u003c/p\u003e\n"],["\u003cp\u003eResponses may include the calculated start and end dates when using relative date ranges in reports.\u003c/p\u003e\n"]]],["Report responses include `headers` specifying metric types (e.g., currency, ratio) and formats. `Rows` contain the report's data, with each row's cells corresponding to header-defined metrics and dimensions. `Totals` and `averages` arrays provide aggregate values for relevant metrics, with ratios shown in `totals` only, and `startdate` and `enddate` show calculated date ranges. This detailed structure allows for flexible processing of report data independent of the chosen dimensions and metrics.\n"],null,["# Handle the Results\n\nHandling a report response is not trivial, particularly if you want your solution to be flexible and independent of the actual dimensions and metrics you chose in your report.\n\nThankfully, the report response is pretty complete and includes a lot of useful information.\n\nHeaders\n-------\n\nYou can use the information returned in the headers to choose how to format a particular metric. It includes information on what type of metric it is, whether it's a currency, ratio or tally for example, and what currency it's in, if it's a monetary value.\n\n**Example:**\n\n```carbon\n\"headers\": [\n { \"name\": \"MONTH\", \"type\": \"DIMENSION\" },\n { \"name\": \"CLICKS\", \"type\": \"METRIC_TALLY\" },\n { \"name\": \"EARNINGS\", \"type\": \"METRIC_CURRENCY\", \"currency\": \"USD\" },\n { \"name\": \"AD_REQUESTS_COVERAGE\", \"type\": \"METRIC_RATIO\" }\n]\n```\n\n\u003cbr /\u003e\n\nRows\n----\n\nThis is where you get the actual report results. Each response row represents a report row, which has a different meaning based on your chosen dimensions.\n\n\u003cbr /\u003e\n\n```text\n\"rows\": [\n { \"cells\":\n [ {\"value\": \"2021-01\"}, {\"value\": \"278\"}, {\"value\": \"63.12\"}, {\"value\": \"0.9998\"} ],\n [ {\"value\": \"2021-02\"}, {\"value\": \"39\"}, {\"value\": \"8.46\"}, {\"value\": \"0.9998\"} ]\n }\n]\n```\n\n\u003cbr /\u003e\n\nTotals and averages\n-------------------\n\nWhen you run a report, you also get back the `totals` and `averages` utility arrays, which will contain a value for each appropriate metric.\n| **Note:** If it doesn't make sense for a metric to have a total, if it's a ratio for example, the only calculated value will be the average. However, it will be returned in the `totals` array, instead of the `averages` array.\n\n\u003cbr /\u003e\n\n```text\n\"totals\": {\n \"cells\": [\n {}, {\"value\": \"317\"}, {\"value\": \"71.58\"}, {\"value\": \"0.9998\"}\n ]\n},\n\"averages\": {\n \"cells\": [\n {}, {\"value\": \"158\"}, {\"value\": \"71.58\"}, {\"value\": \"0.9998\"}\n ]\n}\n```\n\n\u003cbr /\u003e\n\nStart and end Dates\n-------------------\n\nIf you're using [relative dates](/adsense/management/reporting/date_ranges#relative), it may sometimes be useful to know what the calculated start and end dates are.\n\n\u003cbr /\u003e\n\n```text\n\"startDate\": {\"year\": 2021, \"month\": 1, \"day\": 1},\n\"endDate\": {\"year\": 2021, \"month\": 2, \"day\": 28}\n```\n\n\u003cbr /\u003e\n\nNext steps\n----------\n\n- [Filtering](/adsense/management/reporting/filtering)\n- [Running Large Reports](/adsense/management/reporting/large_reports)"]]