Conversion reporting basics

This guide explains how to use the conversion reporting functionality in the Google Analytics Data API v1. This feature lets you generate reports focused on conversion events with support for different attribution models. Conversion reports created with the Data API are similar to the attribution reports you can find in the Advertising > Conversions section of the Google Analytics UI. For more information, see the Conversion performance report help center article.

Purpose of conversion reporting

Conversion reporting provides a way to analyze the effectiveness of your marketing efforts by attributing conversions to specific campaigns, sources, and mediums. Unlike standard event-based reports that only count events, conversion reporting applies an attribution model to distribute credit among the touchpoints that led to a conversion.

Conversions versus event-based reports

  • Event-Based Reports: Provide raw counts of events (e.g., eventCount) and are useful for understanding general activity on your property.
  • Conversions Reports: Focus on events that have been marked as conversions. They use specific dimensions and metrics (see the Conversion Reports Schema) and allow you to see attributed data based on models like Data-driven or Last click.

Enable conversion reports

To run a conversion report, use the runReport method. A request is treated as a conversion report if it queries one or more conversion metrics (for example, allConversionsByInteractionDate), or if the conversionSpec field is populated in the request body.

The conversionSpec object contains the following fields:

  • conversionActions: A list of conversion action resource names to include in the report (e.g., ["conversionActions/12345"]). If empty, all conversions are included. Valid conversion action IDs can be retrieved from the conversion_action field within the conversions list in the response of the GetMetadata method.
  • attributionModel: The attribution model to use. Supported values are DATA_DRIVEN (default) and LAST_CLICK.

Generate a conversion report

Here's a sample request using the runReport method to generate a conversion report showing conversions by campaign name using the Data-driven attribution model.

HTTP

{
    "dateRanges": [
        {
            "startDate": "2026-04-01",
            "endDate": "2026-04-30"
        }
    ],
    "dimensions": [
        {
            "name": "campaignName"
        }
    ],
    "metrics": [
        {
            "name": "allConversionsByConversionDate"
        }
    ],
    "conversionSpec": {
        "conversionActions": [],
        "attributionModel": "DATA_DRIVEN"
    }
}

Example: Re-create a conversion performance report

This example demonstrates how to first retrieve the available conversion actions for a property and then use them to create a report similar to the Conversion Performance report shown in the Google Analytics UI under Advertising > Conversions > Conversion performance.

Step 1: Retrieve conversion actions

Call the getMetadata method to find the valid conversion action IDs for your property. Make sure to specify the GA property ID (instead of using 0 to get fields common for all properties) in order to see conversion actions created for your property.

The response contains a conversions list with the available conversion actions:

{
  ...

  "conversions": [
    {
      "conversionAction": "conversionActions/12345",
      "displayName": "purchase"
    },
    {
      "conversionAction": "conversionActions/67890",
      "displayName": "sign_up"
    }
  ]
}

Step 2: Run the report

Call the runReport method. Use the conversion action IDs found in Step 1 to filter your report, or leave conversionActions empty to report on all conversions. This request recreates a Conversion Performance UI report by showing advertising clicks, ad cost, ad cost per click, ad cost per all conversions, ad impressions, return on ad spend, total revenue, and all conversions by default channel group.

HTTP

{
    "dateRanges": [
        {
            "startDate": "2026-04-01",
            "endDate": "2026-04-30"
        }
    ],
    "dimensions": [
        {
            "name": "defaultChannelGroup"
        }
    ],
    "metrics": [
        {
            "name": "allConversionsByInteractionDate"
        },
        {
            "name": "advertiserAdCost"
        },
        {
            "name": "advertiserAdCostPerAllConversionsByInteractionDate"
        },
        {
            "name": "advertiserAdImpressions"
        },
        {
            "name": "advertiserAdClicks"
        },
        {
            "name": "advertiserAdCostPerClick"
        },
        {
            "name": "totalRevenueByInteractionDate"
        },
        {
            "name": "returnOnAdSpendByInteractionDate"
        }
    ],
    "conversionSpec": {
        "conversionActions": [
            "conversionActions/12345"
        ],
        "attributionModel": "DATA_DRIVEN"
    }
}

Here is a sample response for this request:

{
  "dimensionHeaders": [
    {
      "name": "defaultChannelGroup"
    }
  ],
  "metricHeaders": [
    {
      "name": "allConversionsByInteractionDate",
      "type": "TYPE_FLOAT"
    },
    {
      "name": "advertiserAdCost",
      "type": "TYPE_CURRENCY"
    },
    {
      "name": "advertiserAdCostPerAllConversionsByInteractionDate",
      "type": "TYPE_CURRENCY"
    },
    {
      "name": "advertiserAdImpressions",
      "type": "TYPE_INTEGER"
    },
    {
      "name": "advertiserAdClicks",
      "type": "TYPE_INTEGER"
    },
    {
      "name": "advertiserAdCostPerClick",
      "type": "TYPE_CURRENCY"
    },
    {
      "name": "totalRevenueByInteractionDate",
      "type": "TYPE_CURRENCY"
    },
    {
      "name": "returnOnAdSpendByInteractionDate",
      "type": "TYPE_FLOAT"
    }
  ],
  "rows": [
    {
      "dimensionValues": [
        {
          "value": "Paid Search"
        }
      ],
      "metricValues": [
        {
          "value": "75.2"
        },
        {
          "value": "500"
        },
        {
          "value": "6.65"
        },
        {
          "value": "10000"
        },
        {
          "value": "500"
        },
        {
          "value": "1"
        },
        {
          "value": "1500"
        },
        {
          "value": "3"
        }
      ]
    }
  ],
  "rowCount": 1,
  "metadata": {
    "schemaRestrictionResponse": {},
    "currencyCode": "USD",
    "timeZone": "America/Los_Angeles",
    "section": "SECTION_ADVERTISING"
  },
  "kind": "analyticsData#runReport"
}

You can verify that the response was treated as a conversion report by checking that metadata.section field in the response is set to SECTION_ADVERTISING.

For a full list of available dimensions and metrics for conversion reports, refer to the Conversion Reports Schema.