> Portal Navigation:
> 
> - Append `.md` to any URL under `https://dev.wix.com/docs/` to get its markdown version.
> - Pages are either content pages (article or reference text) or menu pages (a list of links to child pages).
> - To get a menu page, truncate any URL to a parent path and append `.md` (e.g. `https://dev.wix.com/docs/sdk.md`, `https://dev.wix.com/docs/sdk/core-modules.md`).
> - Top-level index of all portals: https://dev.wix.com/docs/llms.txt
> - Full concatenated docs: https://dev.wix.com/docs/llms-full.txt

## Resource: Introduction

## Article: Introduction

## Article Link: https://dev.wix.com/docs/api-reference/business-management/marketing/ads/google-ads/performance-metrics-v1/introduction.md

## Article Content:

# About the Analytics API

The Analytics API queries performance data for a site's running Google Ads campaigns. It returns metrics such as impressions, clicks, conversions, and cost, as well as deeper data including search terms, shopping performance, and asset-level breakdowns for Performance Max Leads campaigns.

With the Analytics API, you can:

- Retrieve performance metrics (impressions, clicks, CTR, cost, conversions) for a campaign over a date range.
- Query search terms that triggered a Smart campaign's or Performance Max Leads campaign's ads.
- Query shopping performance for catalog-based campaigns.
- Retrieve asset-level performance data for Performance Max Leads campaigns.
- Query Wix Analytics conversion data to measure the return on ad spend.

## Before you begin

It's important to note the following points before starting to code:

- Performance data is only available for campaigns in the `LAUNCHED` status. Paused or draft campaigns do not produce analytics data.
- Performance data is typically available within a few hours of campaign activity, though reporting delays can occasionally reach up to 24 hours.
- `QuerySearchTermMetrics` (v1) only works for Smart campaigns. Use `QuerySearchTermMetricsV2` for Performance Max Leads campaigns.
- `QueryConversionMetrics` queries Wix Analytics data, not Google Ads directly.
- All metric costs are returned in the account's currency, not in micros.
- `QueryAssetPerformanceMetrics` only supports Performance Max Leads campaigns. Calling it for any other campaign type returns an error.
- `QueryAssetPerformanceMetrics` results include every asset configured on the campaign, not just assets Google Ads has reported traffic for. Assets without traffic are returned with zero-value metrics so you can see the full creative set.
- Automatically-generated assets (created by Google Ads rather than uploaded by the advertiser) are excluded from `QueryAssetPerformanceMetrics` results unless the campaign has URL expansion enabled.
- Each asset's `performanceLabel` reflects its Google Ads review status first (for example `PENDING` or `DISAPPROVED`); once an asset clears review, the label is based on CTR thresholds that vary by asset type, and assets remain labeled `LEARNING` for an initial period after creation.
- `QueryShoppingPerformanceMetrics` accepts a `dateRange` that scopes both the per-product results and the summary row's revenue, conversions, and ROAS.

## Use cases

- [Retrieve campaign performance analytics](https://dev.wix.com/docs/api-reference/business-management/marketing/ads/google-ads/sample-flows.md#retrieve-campaign-performance-analytics).

## Terminology

- **Impressions**: The number of times an ad was shown.
- **Clicks**: The number of times a user clicked on an ad.
- **Click-Through Rate (CTR)**: The ratio of clicks to impressions.
- **Cost**: The total amount spent on ad delivery, expressed in the account's currency.
- **Conversions**: Actions completed by users after clicking an ad, such as purchases or form submissions.
- **Search Term**: A search query entered by a user that matched a campaign's keyword themes and triggered an ad.

@sdk_package_setup