Retail Media Reporting
Particular Audience's Retail Media platform offers comprehensive reporting capabilities that provide deep insights into your advertising campaigns. These reporting APIs allow you to measure performance, optimize your strategies, and demonstrate ROI to your stakeholders.
Authentication
All retail media reporting APIs use OAuth 2.0 client credentials flow for authentication. This provides secure, token-based access to the reporting APIs.
OAuth 2.0 Client Credentials Flow
Step 1: Obtain Access Token
Token Endpoint: POST {BASE_URL}/connect/token
Request Headers:
Content-Type: application/x-www-form-urlencoded
Request Body (Form Data):
client_id={CLIENT_ID}
client_secret={CLIENT_SECRET}
grant_type=client_credentials
Response:
{
"access_token": "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9...",
"expires_in": 3600,
"token_type": "Bearer"
}
Step 2: Use Access Token
Include the access token in all API requests:
Request Headers:
Authorization: Bearer {access_token}
Content-Type: application/json
Example Authentication Flow
// Step 1: Get access token
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;
};
// Step 2: Use token in API requests
const makeApiRequest = async () => {
const accessToken = await getAccessToken();
const response = await fetch('{BASE_URL}/retail-media/...', {
method: 'GET',
headers: {
'Authorization': `Bearer ${accessToken}`,
'Content-Type': 'application/json'
}
});
return response.json();
};
NEVER expose client credentials or access tokens in client-side JavaScript!
The example above is for demonstration purposes only. In production:
- Client ID and Client Secret must be kept secure on your backend server
- Access Tokens should be obtained and stored server-side
- API Requests should be proxied through your backend to protect credentials
Recommended approach for production:
- Backend Authentication: Handle OAuth flow on your server
- Token Storage: Store access tokens securely on your backend
- API Proxy: Create backend endpoints that make API calls on behalf of your frontend
- Session Management: Use secure sessions to identify authenticated users
Example secure flow:
// Frontend - only makes requests to your own backend
const getCampaignMetrics = async () => {
const response = await fetch('/api/campaign-metrics', {
method: 'GET',
headers: {
'Authorization': 'Bearer YOUR_SESSION_TOKEN' // Your app's session token
}
});
return response.json();
};
Important Notes
- Token Expiration: Access tokens expire after 1 hour (3600 seconds)
- Token Refresh: You must obtain a new token when the current one expires
- Security: Keep your client credentials secure and never expose them in client-side code
- Rate Limiting: Be mindful of API rate limits when making requests
Available Reporting APIs
Campaign Metrics
Access comprehensive campaign-level metrics to evaluate overall performance and ROI for your advertising initiatives. These metrics provide a high-level view of how your campaigns are performing across all ad sets.
- Impressions, clicks, and CTR
- Spend and ROAS metrics
- Sales count and revenue tracking
- Budget and cost management
Ad Set Summary Metrics
Drill down into ad set performance to understand how different audience segments or product groups are performing. These summary metrics help you identify which ad sets are delivering the best results.
- Ad set performance comparison
- Revenue and ROAS analysis
- Sales and conversion tracking
- Cost and discount monitoring
Ad Set Details Metrics
Get granular insights into individual ad set performance with detailed metrics. This level of reporting provides the most comprehensive view of how specific ad sets are performing and where optimizations can be made.
- Product-level performance within ad sets
- Detailed placement effectiveness
- Revenue and cost metrics
- Banner reach and frequency data
Ad Set SKU-Level Metrics
Get granular insights into individual ad set performance with detailed metrics. This level of reporting provides the most comprehensive view of how specific ad sets are performing in SKU-level over the time and where optimizations can be made.
- Daily SKU-level performance tracking
- Product and placement identification
- Revenue and cost analysis by date
- Banner reach and frequency metrics