Documentation Index Fetch the complete documentation index at: https://contentstats.io/docs/llms.txt
Use this file to discover all available pages before exploring further.
Monitor video performance across TikTok, YouTube, Instagram, and Twitter with automated hourly tracking and AI-powered analytics.
Data-Driven Decisions Make informed content decisions based on real performance data
Competitive Advantage Understand what works in your niche before competitors
ROI Measurement Track campaign performance and calculate accurate ROI
How Video Tracking Works
Choose Videos to Track
Select videos you want to monitor:
Your own content
Competitor videos
Trending content
Influencer campaigns
Set Tracking Duration
Decide how long to track (1-30 days):
1-3 days : Quick performance check
7 days : Standard campaign monitoring
14-30 days : Long-term performance analysis
Automatic Data Collection
We collect hourly snapshots automatically:
Views, likes, comments
Platform-specific metrics (shares, saves)
Growth patterns
Analyze Performance
Access data via API or dashboard:
Growth charts
Engagement rates
Viral moment detection
const tiktokMetrics = {
views: "Total video views" ,
likes: "Hearts/likes count" ,
comments: "Comment count" ,
shares: "Share count" ,
saves: "Bookmark/save count"
};
Best for:
Viral content analysis
Influencer vetting
Trend research
Algorithm testing
const youtubeMetrics = {
views: "Total view count" ,
likes: "Like count" ,
comments: "Comment count"
};
Best for:
Long-form content analysis
SEO performance
Subscriber growth correlation
Content strategy planning
const instagramMetrics = {
likes: "Like count" ,
comments: "Comment count" ,
saves: "Save/bookmark count"
};
Best for:
Influencer marketing campaigns
Brand content performance
Hashtag strategy
Aesthetic content testing
const twitterMetrics = {
views: "Impression count" ,
likes: "Like count" ,
retweets: "Retweet count" ,
replies: "Reply count"
};
Best for:
Viral tweet analysis
News/breaking content
Community engagement
Amplification patterns
Example: Complete Tracking Workflow
// 1. Start tracking
const video = await fetch ( 'https://www.contentstats.io/api/v1/videos/track' , {
method: 'POST' ,
headers: {
'Content-Type' : 'application/json' ,
'X-API-Key' : process . env . CONTENTSTATS_API_KEY
},
body: JSON . stringify ({
video_link: 'https://www.tiktok.com/@creator/video/123' ,
duration_days: 7
})
}). then ( r => r . json ());
console . log ( 'Tracking:' , video . id );
// 2. Wait for first snapshot (1 hour)
await new Promise ( resolve => setTimeout ( resolve , 60 * 60 * 1000 ));
// 3. Get performance data
const performance = await fetch (
`https://www.contentstats.io/api/v1/videos/ ${ video . id } ` ,
{ headers: { 'X-API-Key' : apiKey } }
). then ( r => r . json ());
// 4. Analyze growth
const firstSnapshot = performance . snapshots [ 0 ];
const latestSnapshot = performance . snapshots [ performance . snapshots . length - 1 ];
const growth = {
views: parseInt ( latestSnapshot . views ) - parseInt ( firstSnapshot . views ),
likes: parseInt ( latestSnapshot . likes ) - parseInt ( firstSnapshot . likes ),
hours: performance . snapshots . length
};
console . log ( `Growth after ${ growth . hours } hours:` , growth );
Common Use Cases
Monitor influencer marketing campaigns:
async function trackCampaign ( campaignVideos ) {
const results = await Promise . all (
campaignVideos . map ( video =>
fetch ( 'https://www.contentstats.io/api/v1/videos/track' , {
method: 'POST' ,
headers: {
'Content-Type' : 'application/json' ,
'X-API-Key' : apiKey
},
body: JSON . stringify ({
video_link: video . url ,
duration_days: 14
})
}). then ( r => r . json ())
)
);
return results . map (( r , i ) => ({
influencer: campaignVideos [ i ]. influencer ,
trackingId: r . id ,
platform: r . platform ,
url: r . video_link
}));
}
const campaign = await trackCampaign ([
{ influencer: '@creator1' , url: 'https://tiktok.com/...' },
{ influencer: '@creator2' , url: 'https://youtube.com/...' },
{ influencer: '@creator3' , url: 'https://instagram.com/...' }
]);
2. Competitive Analysis
Track top competitors:
async function trackCompetitors ( competitors ) {
const tracked = [];
for ( const competitor of competitors ) {
// Track their top 5 recent videos
for ( const video of competitor . recentVideos . slice ( 0 , 5 )) {
const result = await trackVideo ( video . url , 7 );
tracked . push ({
competitor: competitor . name ,
video: result
});
}
}
return tracked ;
}
3. Content Strategy Research
Identify winning content patterns:
async function researchContentStrategy ( niche ) {
// Get trending videos in niche
const trendingVideos = await getTrendingInNiche ( niche );
// Track top 20 performers
const tracked = await Promise . all (
trendingVideos . slice ( 0 , 20 ). map ( v => trackVideo ( v . url , 3 ))
);
// Analyze after 3 days
setTimeout ( async () => {
const analysis = await analyzeTrendingPatterns ( tracked );
console . log ( 'Winning patterns:' , analysis );
}, 3 * 24 * 60 * 60 * 1000 );
}
4. ROI Measurement
Calculate campaign ROI:
function calculateROI ( video , campaignCost ) {
const snapshots = video . snapshots ;
const latest = snapshots [ snapshots . length - 1 ];
// Estimate value (customize per business)
const viewValue = 0.01 ; // $0.01 per view
const engagementValue = 0.05 ; // $0.05 per engagement
const views = parseInt ( latest . views );
const engagement = parseInt ( latest . likes ) + parseInt ( latest . comments );
const estimatedValue = ( views * viewValue ) + ( engagement * engagementValue );
const roi = (( estimatedValue - campaignCost ) / campaignCost ) * 100 ;
return {
cost: campaignCost ,
estimatedValue ,
roi: roi . toFixed ( 2 ) + '%'
};
}
Growth Rate Analysis
function analyzeGrowthRate ( snapshots ) {
const hourlyGrowth = [];
for ( let i = 1 ; i < snapshots . length ; i ++ ) {
const current = snapshots [ i ];
const previous = snapshots [ i - 1 ];
hourlyGrowth . push ({
hour: i ,
viewGrowth: parseInt ( current . views ) - parseInt ( previous . views ),
likeGrowth: parseInt ( current . likes ) - parseInt ( previous . likes ),
commentGrowth: parseInt ( current . comments ) - parseInt ( previous . comments )
});
}
// Find peak growth hour
const peakHour = hourlyGrowth . reduce (( max , hour ) =>
hour . viewGrowth > max . viewGrowth ? hour : max
);
return {
hourlyGrowth ,
peakHour ,
avgHourlyViews: hourlyGrowth . reduce (( sum , h ) => sum + h . viewGrowth , 0 ) / hourlyGrowth . length
};
}
Engagement Quality Score
function calculateEngagementQuality ( snapshot ) {
const views = parseInt ( snapshot . views );
const likes = parseInt ( snapshot . likes );
const comments = parseInt ( snapshot . comments );
// Calculate engagement rate
const engagementRate = (( likes + comments ) / views ) * 100 ;
return {
engagementRate: engagementRate . toFixed ( 2 ) + '%' ,
totalEngagement: likes + comments
};
}
Best Practices
Define what you’re tracking for:
Awareness : Focus on views and reach
Engagement : Track likes, comments, shares
Conversions : Monitor click-through and saves
Match duration to content type:
News/Trending : 1-3 days
Product launches : 7-14 days
Evergreen content : 14-30 days
Campaign monitoring : 7-14 days
Track multiple videos to establish benchmarks: const benchmark = {
avgViews24h: 50000 ,
avgEngagementRate: 3.5
};
function compareToBenchmark ( video , benchmark ) {
const latest = video . snapshots [ video . snapshots . length - 1 ];
const views24h = calculateViews24h ( video . snapshots );
return {
viewsVsBenchmark: ( views24h / benchmark . avgViews24h * 100 ). toFixed ( 0 ) + '%'
};
}
TikTok Tracking Track TikTok videos
YouTube Tracking Monitor YouTube performance
Instagram Tracking Track Instagram posts
API Reference Complete API docs
Next Steps
Hourly Tracking Guide Benefits of hourly snapshots
Automate Analytics Build automated systems
Real-Time Analytics Set up live dashboards
Quickstart Start tracking now