Overview
Get detailed analytics and performance metrics for a specific campaign. This endpoint provides comprehensive insights into campaign performance, prospect engagement, and conversion metrics.
Path Parameters
The unique identifier of the campaign to analyze
Use Cases
- Campaign Performance Review: Analyze individual campaign effectiveness
- Optimization Insights: Identify areas for campaign improvement
- ROI Analysis: Calculate return on investment for specific campaigns
- A/B Testing: Compare performance between different campaign strategies
Response Structure
Campaign Details
- Basic campaign information and configuration
- Current status and timeline
- Prospect engagement statistics
- Message and response metrics
- Qualification and conversion rates
Daily Activity Breakdown
- Day-by-day activity analysis
- Trend identification over time
Status Distribution
- Breakdown of prospects by conversation status
- Qualification status analysis
Example Response
{
"campaign": {
"id": "campaign_123",
"name": "Q4 Enterprise Outreach",
"status": "active",
"createdAt": "2024-01-15T10:30:00Z",
"agent": "agent_456",
"product": "Enterprise Solution"
},
"metrics": {
"totalProspects": 150,
"totalMessages": 420,
"totalQualified": 12,
"totalAnswers": 35,
"totalClosed": 8,
"conversionRate": 8.0,
"responseRate": 23.33,
"qualificationRate": 34.29,
"averageMessagesPerProspect": 2.8
},
"activity": {
"dailyBreakdown": [
{
"date": "2024-01-20",
"messages": 25,
"responses": 4,
"qualified": 1
},
{
"date": "2024-01-19",
"messages": 30,
"responses": 6,
"qualified": 2
}
],
"last7Days": {
"messages": 180,
"responses": 28,
"qualified": 8
}
},
"statusDistribution": {
"pending": 85,
"contacted": 45,
"responded": 35,
"qualified": 12,
"closed": 8
},
"qualificationBreakdown": {
"pending": 123,
"qualified": 12,
"disqualified": 15
}
}
Testing Example
curl -X GET "https://api.kakiyo.com/v1/analytics/campaigns/campaign_123" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json"
// JavaScript/Node.js
const campaignId = 'campaign_123';
const response = await fetch(`https://api.kakiyo.com/v1/analytics/campaigns/${campaignId}`, {
method: 'GET',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json'
}
});
const analytics = await response.json();
console.log('Campaign Analytics:', analytics);
# Python
import requests
campaign_id = 'campaign_123'
response = requests.get(
f'https://api.kakiyo.com/v1/analytics/campaigns/{campaign_id}',
headers={
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json'
}
)
analytics = response.json()
print('Campaign Analytics:', analytics)
Error Responses
Campaign Not Found
{
"error": "not_found",
"message": "Campaign not found"
}
Access Denied
{
"error": "forbidden",
"message": "You do not have access to this campaign"
}
Analytics Insights
High-Performing Campaigns:
- Response rate > 20%
- Qualification rate > 30%
- Conversion rate > 5%
Optimization Opportunities:
- Low response rate: Review messaging strategy
- High responses, low qualification: Improve targeting
- High qualification, low closing: Enhance follow-up process
Daily Activity Patterns
Monitor daily breakdowns to identify:
- Peak engagement days
- Message volume optimization
- Response timing patterns
Best Practices
- Regular Review: Analyze campaign metrics weekly
- Comparative Analysis: Compare with team averages
- Trend Monitoring: Track performance changes over time
- Data-Driven Decisions: Use metrics to guide campaign adjustments