Ad Set SKU-Level Metrics API
This section provides detailed information about the Ad Set SKU-Level Metrics API in Retail Media Reporting.
Overview
The Ad Set SKU-Level Metrics API retrieves SKU-level metrics for ad sets, providing granular performance data per product SKU. This API helps you track and analyze the effectiveness of your advertising sets across various placements and products over a specific date range.
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-sku-level-metrics
Path Parameters
Parameter | Type | Description |
---|---|---|
supplierId | string | The supplier identifier |
retailerId | string | The retailer identifier |
campaignId | string | The campaign identifier |
Query Parameters
Parameter | Type | Required | Description |
---|---|---|---|
fromDate | string | Yes | Start date in YYYY-MM-DD format |
toDate | string | Yes | End date in YYYY-MM-DD format |
page | number | No | Page number for pagination |
Request Headers
Authorization: Bearer {access_token}
Content-Type: application/json
Response
Success Response
Status Code: 200 OK
{
"status": "success",
"message": "SKU-level metrics retrieved successfully",
"errorCode": "",
"data": [
{
"date": "2024-03-15",
"supplierId": "supplier_123",
"supplierName": "Acme Corporation",
"campaignId": "campaign_789",
"campaignName": "Spring Sale Campaign",
"adSetId": "adset_456",
"adSetName": "Ad Set 1",
"placementId": "placement_789",
"placementName": "Homepage Banner",
"adSetType": "Sponsored",
"adSetStrategy": "Auto",
"costType": "CPC",
"productId": "product_123",
"refId": "ref_456",
"sku": "SKU-XYZ-1",
"bannerId": "banner_123",
"spend": 500.25,
"discount": 25.00,
"impression": 5000,
"clicks": 150,
"sponsoredUnits": 10,
"sponsoredRevenue": 750.00,
"reach": 4500,
"frequency": 1.11
}
],
"pagination": {
"currentPage": 1,
"totalPages": 1,
"totalRecords": 1,
"pageSize": 100
},
"metadata": {}
}
Available Metrics
The Ad Set SKU-Level Metrics API provides comprehensive data about your ad sets at the SKU level, including performance indicators and financial metrics. Here's a detailed breakdown of the available metrics:
Metric | Description | Type | Aggregation |
---|---|---|---|
date | Date of the ad set running period (YYYY-MM-DD) | string | Date Range |
supplierId | ID of the supplier | string | Date Range |
supplierName | Name of the supplier | string | Date Range |
campaignId | ID of the campaign | string | Date Range |
campaignName | Name of the campaign | string | Date Range |
adSetId | ID of the ad set | string | Date Range |
adSetName | Name of the ad set | string | Date Range |
placementId | ID of the placement | string | Date Range |
placementName | Name of the placement | string | Date Range |
adSetType | Type of the ad set (Sponsored, Sponsored Search, Sponsored Product, Sponsored Display) | string | Date Range |
adSetStrategy | Strategy of the ad set (Auto, Relevance, Hybrid, Bid) | string | Date Range |
costType | Cost type (CPC, CPM, CPA) | string | Date Range |
productId | PA generated ID of the product (optional) | string | Date Range |
refId | Unique identifier of the product (optional) | string | Date Range |
sku | SKU of the product (optional) | string | Date Range |
bannerId | Banner identifier (optional) | string | Date Range |
spend | Amount spent for the ad set on that date | number | Date Range |
discount | Discount amount applied on that date | number | Date Range |
impression | Number of times the product was displayed on that date | number | Date Range |
clicks | Number of clicks received on that date | number | Date Range |
sponsoredUnits | Number of units sold through sponsored ads on that date | number | Date Range |
sponsoredRevenue | Revenue attributed to the sponsored product on that date | number | Date Range |
reach | For sponsored display, number of unique visitors who viewed the banner | number | Date Range |
frequency | For sponsored display, ratio of impressions to unique visitors | number | Date Range |
Understanding the Metrics
The Ad Set SKU-Level Metrics provide insights into various aspects of your ad set performance at the product level:
Performance Metrics
- Impressions: Total number of times your products were displayed on a specific date
- Clicks: Total number of clicks received on a specific date
- Reach: Number of unique visitors who viewed the banner (for sponsored display)
- Frequency: Ratio of impressions to unique visitors (for sponsored display)
Financial Metrics
- Spend: Total amount spent on the ad set on a specific date
- Discount: Discount amount applied on a specific date
- Cost Type: The pricing model used (CPC, CPM, CPA)
Sales Metrics
- Sponsored Units: Number of units sold through sponsored ads on a specific date
- Sponsored Revenue: Total revenue attributed to the sponsored product on a specific date
Product Information
- Product ID: PA generated identifier for the product
- Reference ID: Unique identifier of the product
- SKU: Stock keeping unit of the product
- Banner ID: Identifier for the banner (for display ads)
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 getAdSetSkuLevelMetrics = async () => {
const accessToken = await getAccessToken();
const response = await fetch(
'{BASE_URL}/retail-media/supplier/{supplierId}/retailers/{retailerId}/campaign/{campaignId}/adset-sku-level-metrics?fromDate=2024-03-01&toDate=2024-03-31&page=1',
{
method: 'GET',
headers: {
'Authorization': `Bearer ${accessToken}`,
'Content-Type': 'application/json'
}
}
);
const data = await response.json();
console.log(data);
};
Best Practices
- Daily Monitoring: Check SKU-level metrics daily to ensure optimal performance
- Performance Analysis: Use impressions and clicks to optimize product visibility
- Revenue Tracking: Monitor sponsored revenue to ensure product-level profitability
- Budget Management: Track spend against performance metrics on a daily basis
- Product Performance: Analyze which SKUs perform best in different placements
- Placement Optimization: Use placement data to optimize product positioning
- Date Range Analysis: Compare performance across different date ranges to identify trends
- SKU-Level Optimization: Use granular data to optimize individual product performance
- Cost Efficiency: Monitor cost types and strategies to optimize spending
- Pagination: Use pagination parameters to handle large datasets efficiently