Analyze Youtube Affiliate Performance (Alpha)

You can retrieve key performance metrics for your products participating in the Youtube Affiliate Program using the Reporting sub-API. This guide explains how to query YouTube-specific affiliate data, such as sales, commissions, orders, views, and clicks, attributed to different creators, video content, and individual products.

You can use Merchant Center Query Language (MCQL) to select metrics and dimensions from dedicated Youtube Affiliate views, which function like tables in your queries.

Prerequisites

Before using this guide, ensure that:

Query the alpha endpoint

Note that given this is in public alpha, the endpoint differs. To retrieve Youtube Affiliate performance data, you need to send the POST request to the v1alpha endpoint. Here's a sample request:

HTTP

POST https://merchantapi.googleapis.com/reports/v1alpha/accounts/{ACCOUNT_ID}/reports:search

cURL

  curl -X POST \
  'https://merchantapi.googleapis.com/reports/v1alpha/accounts/{ACCOUNT_ID}/reports:search?key=[YOUR_API_KEY]' \
  --header 'Authorization: Bearer {YOUR_ACCESS_TOKEN}' \
  --header 'Accept: application/json' \
  --compressed

See performance by creator

To understand which YouTube creators are driving the most engagement and sales, you can query the youtube_creator_performance_view. This view aggregates metrics by individual YouTube creators and includes creator titles and channel IDs.

Here is an MCQL SELECT statement example you can use to get the top 3 performing creators by sales between May 1st and May 2nd, 2025:

SELECT
  title,
  channel_id,
  gross_sales,
  net_sales,
  commissions,
  orders,
  clicks,
  views
FROM youtube_creator_performance_view
WHERE date >= '2025-05-01' AND date < '2025-05-02'
ORDER BY gross_sales DESC LIMIT 3

This query fetches the creator title, channel ID, and key performance metrics for the top 3 creators ranked by the gross sales metric within the specified date range.

See performance by content

To see which specific YouTube videos are performing best, you can query the youtube_content_performance_view. This view aggregates metrics by individual YouTube videos and includes video titles and IDs.

To retrieve the top 3 videos by views between May 1st and May 2nd, 2025, pass the following MCQL statement to the accounts.reports.search method:

SELECT
  title,
  video_id,
  gross_sales,
  net_sales,
  commissions,
  orders,
  clicks,
  views
FROM youtube_content_performance_view
WHERE date >= '2025-05-01' AND date < '2025-05-02'
ORDER BY views DESC LIMIT 3

This query retrieves the video title, video ID, and key metrics for the top 3 videos ranked by the total number of views in the specified date range.

See tagged products with most engagement

To understand which tagged products have the most engagement and sales, you can query the youtube_product_tagged_stats_view. This view aggregates metrics by individual tagged products, including their titles and offer IDs.

Here is an MCQL SELECT statement example you can use to get the top 10 products by views between January 20th and 21st, 2026:

SELECT
  title,
  offer_id,
  tagged_creator_count,
  tagged_video_count,
  gross_sales,
  net_sales,
  commissions,
  views,
  clicks,
  impressions,
  orders,
  conversion_rate
FROM youtube_product_tagged_stats_view
WHERE date >= '2026-01-20' AND date < '2026-01-21'
ORDER BY views DESC LIMIT 10

This query retrieves the titles, tagged video count, and key metrics for the top 10 products ranked by the total number of views in the specified date range.

See most sold products

To understand which products have the most sales, you can query the youtube_product_sold_stats_view.

Here is an MCQL SELECT statement example you can use to get the top 10 products ranked by gross sales between January 20th and 21st, 2026:

SELECT
  title,
  offer_id,
  gross_sales,
  net_sales,
  commissions,
  orders
FROM youtube_product_sold_stats_view
WHERE date >= '2026-01-20' AND date < '2026-01-21'
ORDER BY gross_sales DESC LIMIT 10

This query retrieves the sales data, commissions, and key metrics for the top 10 products ordered by gross sales, in the specified date range.

Important considerations

  • Dates: Always filter your queries by date using WHERE clauses to specify the reporting period. Dates are in YYYY-MM-DD format.
  • Latency: The latency of queries depend on the volume of data requested. Queries that cover large data sets take longer and might cause timeouts.