Skip to main content

Ad Set Detail Metrics API

This section provides detailed information about the Ad Set Detail Metrics API in Retail Media Reporting.

Overview

The Ad Set Detail Metrics API retrieves detailed metrics for ad sets including placement and product-level data. This API returns all-time data (no date filtering) and provides insights into the performance of individual ad sets within your campaigns, helping you track and analyze the effectiveness of your advertising sets across various placements and products.

Authentication

This API uses OAuth 2.0 client credentials flow for authentication. See the Authentication section for detailed instructions.

API Endpoint

Method: GET

URL: {BASE_URL}/retail-media/supplier/{supplierId}/retailers/{retailerId}/campaign/{campaignId}/adset-details-metrics

Path Parameters

ParameterTypeDescription
supplierIdstringThe supplier identifier
retailerIdstringThe retailer identifier
campaignIdstringThe campaign identifier

Request Headers

Authorization: Bearer {access_token}
Content-Type: application/json

Response

Success Response

Status Code: 200 OK

{
"status": "success",
"message": "Ad set detail metrics retrieved successfully",
"errorCode": "",
"data": {
"adSets": [
{
"name": "Ad Set 1",
"version": "v1",
"placements": [
{
"name": "Homepage Banner",
"products": [
{
"name": "Product A",
"link": "https://example.com/product-a",
"impressions": "15000",
"roas": "2.5",
"clicks": "450",
"amountSpent": "2500.00",
"discount": "125.00",
"avgCPC": "5.56",
"avgCPA": "25.00",
"avgCPM": "166.67",
"sponsoredUnitsSold": "25",
"attributedRevenue": "6250.00",
"reach": "12000",
"frequency": "1.25",
"bannerId": "banner_123"
}
]
}
]
}
]
},
"metadata": {}
}

Available Metrics

The Ad Set Detail Metrics API provides comprehensive data about your ad sets, including performance indicators and financial metrics. Here's a detailed breakdown of the available metrics:

MetricDescriptionTypeAggregation
nameName of the ad setstringAll-Time
versionVersion of the ad setstringAll-Time
placementsArray of placements within the ad setarrayAll-Time
productsArray of products within each placementarrayAll-Time
impressionsNumber of times the product was displayedstringAll-Time
roasReturn on ad spend (ROAS) for the productstringAll-Time
clicksNumber of clicks receivedstringAll-Time
amountSpentTotal amount spent on the productstringAll-Time
discountDiscount amount applied to the productstringAll-Time
avgCPCAverage cost per clickstringAll-Time
avgCPAAverage cost per acquisitionstringAll-Time
avgCPMAverage cost per thousand impressionsstringAll-Time
sponsoredUnitsSoldNumber of units sold through sponsored adsstringAll-Time
attributedRevenueRevenue attributed to the sponsored productstringAll-Time
reachBanner reach metricstringAll-Time
frequencyBanner frequency metricstringAll-Time
bannerIdBanner identifierstringAll-Time

Understanding the Metrics

The Ad Set Detail Metrics provide insights into various aspects of your ad set performance:

Performance Metrics

  • Impressions: Total number of times your products were displayed
  • Clicks: Total number of clicks received
  • Reach: Number of unique users reached by the banner
  • Frequency: Average number of times each user saw the banner

Financial Metrics

  • Amount Spent: Total amount spent on the product
  • Average CPC: Average cost per click for the product
  • Average CPA: Average cost per acquisition
  • Average CPM: Average cost per thousand impressions
  • Discount: Discount amount applied to the product

Sales Metrics

  • Sponsored Units Sold: Number of units sold through sponsored ads
  • Attributed Revenue: Total revenue attributed to the sponsored product
  • ROAS (Return on Ad Spend): Return on investment for the product

Example Usage (JavaScript)

// First, obtain an access token using OAuth 2.0 client credentials flow
const getAccessToken = async () => {
const response = await fetch('{BASE_URL}/connect/token', {
method: 'POST',
headers: {
'Content-Type': 'application/x-www-form-urlencoded',
},
body: new URLSearchParams({
client_id: 'YOUR_CLIENT_ID',
client_secret: 'YOUR_CLIENT_SECRET',
grant_type: 'client_credentials'
})
});

const data = await response.json();
return data.access_token;
};

// Then, make the API request
const getAdSetDetailMetrics = async () => {
const accessToken = await getAccessToken();

const response = await fetch(
'{BASE_URL}/retail-media/supplier/{supplierId}/retailers/{retailerId}/campaign/{campaignId}/adset-details-metrics',
{
method: 'GET',
headers: {
'Authorization': `Bearer ${accessToken}`,
'Content-Type': 'application/json'
}
}
);

const data = await response.json();
console.log(data);
};

Best Practices

  1. Regular Monitoring: Check ad set metrics daily to ensure optimal performance
  2. Performance Analysis: Use impressions and clicks to optimize product visibility
  3. ROAS Tracking: Monitor ROAS to ensure product-level profitability
  4. Budget Management: Track amount spent against performance metrics
  5. Product Performance: Analyze which products perform best in different placements
  6. Placement Optimization: Use placement data to optimize product positioning
  7. Banner Analysis: Monitor reach and frequency metrics to understand banner effectiveness
  8. Revenue Attribution: Track attributed revenue to understand conversion effectiveness
  9. Cost Analysis: Monitor CPC, CPA, and CPM to optimize cost efficiency
  10. Discount Impact: Analyze how discounts affect product performance