From bbba25a8ce4d0546fb8af8fd985a11c5801ded22 Mon Sep 17 00:00:00 2001 From: Alireza Rezvani Date: Fri, 30 Jan 2026 13:53:39 +0100 Subject: [PATCH] fix(skill): restructure social-media-analyzer with proper organization (#77) (#147) - Reorganize file structure: - Move Python scripts to scripts/ - Move example files to assets/ - Create references/ with platform-benchmarks.md - Create platform-benchmarks.md with engagement, CTR, CPC benchmarks - Rewrite SKILL.md with: - 10 trigger phrases for discoverability - Table of Contents - Numbered analysis workflow with validation - Data validation checklist - ROI calculation workflow - Example input/output with interpretation - Remove verbose marketing copy - Reference example files properly Co-authored-by: Claude Opus 4.5 --- .../social-media-analyzer/SKILL.md | 310 +++++++++++++++--- .../analyze_performance.cpython-313.pyc | Bin 7982 -> 0 bytes .../calculate_metrics.cpython-313.pyc | Bin 8085 -> 0 bytes .../{ => assets}/expected_output.json | 0 .../{ => assets}/sample_input.json | 0 .../references/platform-benchmarks.md | 226 +++++++++++++ .../{ => scripts}/analyze_performance.py | 0 .../{ => scripts}/calculate_metrics.py | 0 8 files changed, 486 insertions(+), 50 deletions(-) delete mode 100644 marketing-skill/social-media-analyzer/__pycache__/analyze_performance.cpython-313.pyc delete mode 100644 marketing-skill/social-media-analyzer/__pycache__/calculate_metrics.cpython-313.pyc rename marketing-skill/social-media-analyzer/{ => assets}/expected_output.json (100%) rename marketing-skill/social-media-analyzer/{ => assets}/sample_input.json (100%) create mode 100644 marketing-skill/social-media-analyzer/references/platform-benchmarks.md rename marketing-skill/social-media-analyzer/{ => scripts}/analyze_performance.py (100%) rename marketing-skill/social-media-analyzer/{ => scripts}/calculate_metrics.py (100%) diff --git a/marketing-skill/social-media-analyzer/SKILL.md b/marketing-skill/social-media-analyzer/SKILL.md index a7c33b9..ede4004 100644 --- a/marketing-skill/social-media-analyzer/SKILL.md +++ b/marketing-skill/social-media-analyzer/SKILL.md @@ -1,70 +1,280 @@ --- name: social-media-analyzer -description: Analyzes social media campaign performance across platforms with engagement metrics, ROI calculations, and audience insights for data-driven marketing decisions +description: Social media campaign analysis and performance tracking. Calculates engagement rates, ROI, and benchmarks across platforms. Use for analyzing social media performance, calculating engagement rate, measuring campaign ROI, comparing platform metrics, or benchmarking against industry standards. +triggers: + - analyze social media + - calculate engagement rate + - social media ROI + - campaign performance + - compare platforms + - benchmark engagement + - Instagram analytics + - Facebook metrics + - TikTok performance + - LinkedIn engagement --- -# Social Media Campaign Analyzer +# Social Media Analyzer -This skill provides comprehensive analysis of social media campaign performance, helping marketing agencies deliver actionable insights to clients. +Campaign performance analysis with engagement metrics, ROI calculations, and platform benchmarks. -## Capabilities +--- -- **Multi-Platform Analysis**: Track performance across Facebook, Instagram, Twitter, LinkedIn, TikTok -- **Engagement Metrics**: Calculate engagement rate, reach, impressions, click-through rate -- **ROI Analysis**: Measure cost per engagement, cost per click, return on ad spend -- **Audience Insights**: Analyze demographics, peak engagement times, content performance -- **Trend Detection**: Identify high-performing content types and posting patterns -- **Competitive Benchmarking**: Compare performance against industry standards +## Table of Contents -## Input Requirements +- [Analysis Workflow](#analysis-workflow) +- [Engagement Metrics](#engagement-metrics) +- [ROI Calculation](#roi-calculation) +- [Platform Benchmarks](#platform-benchmarks) +- [Tools](#tools) +- [Examples](#examples) -Campaign data including: -- **Platform metrics**: Likes, comments, shares, saves, clicks -- **Reach data**: Impressions, unique reach, follower growth -- **Cost data**: Ad spend, campaign budget (for ROI calculations) -- **Content details**: Post type (image, video, carousel), posting time, hashtags -- **Time period**: Date range for analysis +--- -Formats accepted: -- JSON with structured campaign data -- CSV exports from social media platforms -- Text descriptions of key metrics +## Analysis Workflow -## Output Formats +Analyze social media campaign performance: -Results include: -- **Performance dashboard**: Key metrics with trends -- **Engagement analysis**: Best and worst performing posts -- **ROI breakdown**: Cost efficiency metrics -- **Audience insights**: Demographics and behavior patterns -- **Recommendations**: Data-driven suggestions for optimization -- **Visual reports**: Charts and graphs (Excel/PDF format) +1. Validate input data completeness (reach > 0, dates valid) +2. Calculate engagement metrics per post +3. Aggregate campaign-level metrics +4. Calculate ROI if ad spend provided +5. Compare against platform benchmarks +6. Identify top and bottom performers +7. Generate recommendations +8. **Validation:** Engagement rate < 100%, ROI matches spend data -## How to Use +### Input Requirements -"Analyze this Facebook campaign data and calculate engagement metrics" -"What's the ROI on this Instagram ad campaign with $500 spend and 2,000 clicks?" -"Compare performance across all social platforms for the last month" +| Field | Required | Description | +|-------|----------|-------------| +| platform | Yes | instagram, facebook, twitter, linkedin, tiktok | +| posts[] | Yes | Array of post data | +| posts[].likes | Yes | Like/reaction count | +| posts[].comments | Yes | Comment count | +| posts[].reach | Yes | Unique users reached | +| posts[].impressions | No | Total views | +| posts[].shares | No | Share/retweet count | +| posts[].saves | No | Save/bookmark count | +| posts[].clicks | No | Link clicks | +| total_spend | No | Ad spend (for ROI) | -## Scripts +### Data Validation Checks -- `calculate_metrics.py`: Core calculation engine for all social media metrics -- `analyze_performance.py`: Performance analysis and recommendation generation +Before analysis, verify: -## Best Practices +- [ ] Reach > 0 for all posts (avoid division by zero) +- [ ] Engagement counts are non-negative +- [ ] Date range is valid (start < end) +- [ ] Platform is recognized +- [ ] Spend > 0 if ROI requested -1. Ensure data completeness before analysis (missing metrics affect accuracy) -2. Compare metrics within same time periods for fair comparisons -3. Consider platform-specific benchmarks (Instagram engagement differs from LinkedIn) -4. Account for organic vs. paid metrics separately -5. Track metrics over time to identify trends -6. Include context (seasonality, campaigns, events) when interpreting results +--- -## Limitations +## Engagement Metrics -- Requires accurate data from social media platforms -- Industry benchmarks are general guidelines and vary by niche -- Historical data doesn't guarantee future performance -- Organic reach calculations may vary by platform algorithm changes -- Cannot access data directly from platforms (requires manual export or API integration) -- Some platforms limit data availability (e.g., TikTok analytics for business accounts only) +### Engagement Rate Calculation + +``` +Engagement Rate = (Likes + Comments + Shares + Saves) / Reach × 100 +``` + +### Metric Definitions + +| Metric | Formula | Interpretation | +|--------|---------|----------------| +| Engagement Rate | Engagements / Reach × 100 | Audience interaction level | +| CTR | Clicks / Impressions × 100 | Content click appeal | +| Reach Rate | Reach / Followers × 100 | Content distribution | +| Virality Rate | Shares / Impressions × 100 | Share-worthiness | +| Save Rate | Saves / Reach × 100 | Content value | + +### Performance Categories + +| Rating | Engagement Rate | Action | +|--------|-----------------|--------| +| Excellent | > 6% | Scale and replicate | +| Good | 3-6% | Optimize and expand | +| Average | 1-3% | Test improvements | +| Poor | < 1% | Analyze and pivot | + +--- + +## ROI Calculation + +Calculate return on ad spend: + +1. Sum total engagements across posts +2. Calculate cost per engagement (CPE) +3. Calculate cost per click (CPC) if clicks available +4. Estimate engagement value using benchmark rates +5. Calculate ROI percentage +6. **Validation:** ROI = (Value - Spend) / Spend × 100 + +### ROI Formulas + +| Metric | Formula | +|--------|---------| +| Cost Per Engagement (CPE) | Total Spend / Total Engagements | +| Cost Per Click (CPC) | Total Spend / Total Clicks | +| Cost Per Thousand (CPM) | (Spend / Impressions) × 1000 | +| Return on Ad Spend (ROAS) | Revenue / Ad Spend | + +### Engagement Value Estimates + +| Action | Value | Rationale | +|--------|-------|-----------| +| Like | $0.50 | Brand awareness | +| Comment | $2.00 | Active engagement | +| Share | $5.00 | Amplification | +| Save | $3.00 | Intent signal | +| Click | $1.50 | Traffic value | + +### ROI Interpretation + +| ROI % | Rating | Recommendation | +|-------|--------|----------------| +| > 500% | Excellent | Scale budget significantly | +| 200-500% | Good | Increase budget moderately | +| 100-200% | Acceptable | Optimize before scaling | +| 0-100% | Break-even | Review targeting and creative | +| < 0% | Negative | Pause and restructure | + +--- + +## Platform Benchmarks + +### Engagement Rate by Platform + +| Platform | Average | Good | Excellent | +|----------|---------|------|-----------| +| Instagram | 1.22% | 3-6% | >6% | +| Facebook | 0.07% | 0.5-1% | >1% | +| Twitter/X | 0.05% | 0.1-0.5% | >0.5% | +| LinkedIn | 2.0% | 3-5% | >5% | +| TikTok | 5.96% | 8-15% | >15% | + +### CTR by Platform + +| Platform | Average | Good | Excellent | +|----------|---------|------|-----------| +| Instagram | 0.22% | 0.5-1% | >1% | +| Facebook | 0.90% | 1.5-2.5% | >2.5% | +| LinkedIn | 0.44% | 1-2% | >2% | +| TikTok | 0.30% | 0.5-1% | >1% | + +### CPC by Platform + +| Platform | Average | Good | +|----------|---------|------| +| Facebook | $0.97 | <$0.50 | +| Instagram | $1.20 | <$0.70 | +| LinkedIn | $5.26 | <$3.00 | +| TikTok | $1.00 | <$0.50 | + +See `references/platform-benchmarks.md` for complete benchmark data. + +--- + +## Tools + +### Calculate Metrics + +```bash +python scripts/calculate_metrics.py assets/sample_input.json +``` + +Calculates engagement rate, CTR, reach rate for each post and campaign totals. + +### Analyze Performance + +```bash +python scripts/analyze_performance.py assets/sample_input.json +``` + +Generates full performance analysis with ROI, benchmarks, and recommendations. + +**Output includes:** +- Campaign-level metrics +- Post-by-post breakdown +- Benchmark comparisons +- Top performers ranked +- Actionable recommendations + +--- + +## Examples + +### Sample Input + +See `assets/sample_input.json`: + +```json +{ + "platform": "instagram", + "total_spend": 500, + "posts": [ + { + "post_id": "post_001", + "content_type": "image", + "likes": 342, + "comments": 28, + "shares": 15, + "saves": 45, + "reach": 5200, + "impressions": 8500, + "clicks": 120 + } + ] +} +``` + +### Sample Output + +See `assets/expected_output.json`: + +```json +{ + "campaign_metrics": { + "total_engagements": 1521, + "avg_engagement_rate": 8.36, + "ctr": 1.55 + }, + "roi_metrics": { + "total_spend": 500.0, + "cost_per_engagement": 0.33, + "roi_percentage": 660.5 + }, + "insights": { + "overall_health": "excellent", + "benchmark_comparison": { + "engagement_status": "excellent", + "engagement_benchmark": "1.22%", + "engagement_actual": "8.36%" + } + } +} +``` + +### Interpretation + +The sample campaign shows: +- **Engagement rate 8.36%** vs 1.22% benchmark = Excellent (6.8x above average) +- **CTR 1.55%** vs 0.22% benchmark = Excellent (7x above average) +- **ROI 660%** = Outstanding return on $500 spend +- **Recommendation:** Scale budget, replicate successful elements + +--- + +## Reference Documentation + +### Platform Benchmarks + +`references/platform-benchmarks.md` contains: + +- Engagement rate benchmarks by platform and industry +- CTR benchmarks for organic and paid content +- Cost benchmarks (CPC, CPM, CPE) +- Content type performance by platform +- Optimal posting times and frequency +- ROI calculation formulas diff --git a/marketing-skill/social-media-analyzer/__pycache__/analyze_performance.cpython-313.pyc b/marketing-skill/social-media-analyzer/__pycache__/analyze_performance.cpython-313.pyc deleted file mode 100644 index 6a9527b8ea2d0f1977e499848fb56bff71415d66..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 7982 zcmb_hTWlLwdLCXyQ51EhEYp-cy4hkZ(HGg4t=Lk$N_H(f@kJ9Zl-9e0(Qri0ikeZ* z45f-~)4XJ%MNl+ZtaqKKm66?+28yoVRw!B^?Nc7M00|l(J5OE|$iiqJnA*E3^3?x7 z!x;`0$#J$FK!<0}{O6qiobzA4@91fJdys+W?#>sPk7Eq;ANXQD-g@QfDX83KIEFBs zi*sLhU2_xnH4pJz^Aa!1^fSW@=ZP|$_nh18L40Xn+@F_%w5Og)tLwVFCg)Aj=AK$2_yp&S zdkpWZvZx#0*JVvNJXe%0(bUB(Tk0=Qt5CVi++m0dmgDAJ#KXCXm-BF5&X;g=ey)Z7 z2Dn!G8|2#PZ-{HBzu|(<6zMb`QT~X!-Ued~S)Aklq>a3gV zq3uCvZ@bfiJ)y0awuS1l^%0>xLfhM$Wcz4axT)G%Hg_U_<&Pv_F{JAd=9zaRh2T)pq#&808XQNEl@U;S;q_aDCV z+qv`~#!;v`m!`v44!!a_P!yipT-;{_Rs>O6R@GIb6^ua_(nMG@TJ%j>*Ck>Eva+%& zrDVnM>+-4&Qk~Yi_%%rOPjG+VzVymCFxqk zQ`+;O2UvE#XqlBm=3Kp=WU`k3FlkTRo4+4iP-I;evT|NxVHp`XiL98*!rrCWy3UDU z@Cr$5GeH)fy$hOQ(Za!91hU1dEB5!MgRBok2XL%^Z{Nk63)BxqRnx7>gGOK-v_Xe8 zT5`&&qHZcT;y%&^D{Wyb;^SfD_i&2n?=GLh&wB>tu#bKMD*~j~sgx=&$yV zSNbPP{S$>h**#qDpRe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{oPJWahx}gGL10n>> z1%SDg?AUr%l%-UYvj!U?4sV?WP4;^00<;<9&-d2GV86f-{uT;w*T^AAQU_lB+3wm` z2@RA&1I58Rk3!#juDf=>f1w((#lQC`^!?|GQ}Ej){@K9s?L7Kx;&yS;_Sd+_WEj1m zHf0t!;$8TU3`JOz;2#-5o;Uxi3H1=qsY;J-Eq zrc1*Ek&IvfBvC9VYQdObLYM1U!+1#OHb;1Rdn}8*pu@kumUBRqc>V!H!-^R^5%Uo& z5Z-D32*nSXfA_u$H=gmyhi{g8XR7dA0J8u?7?!Wbn!Fp|!wxkME z_vJ5Wi@7XZ%nbl#Z^1A86L4!C+?Vbhq5DMlj;{I+2sC!W2wXCcWtMy&J|ME!SSV^9 gm&^6J+vDKXiou1?FhsWdHyG diff --git a/marketing-skill/social-media-analyzer/__pycache__/calculate_metrics.cpython-313.pyc b/marketing-skill/social-media-analyzer/__pycache__/calculate_metrics.cpython-313.pyc deleted file mode 100644 index 58cb35875021182c3fe3e8edd5cf5069c32cee28..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 8085 zcmcgRZA=^4wPSn6HpV~_KK&6G0s&0G$!^Gor8EiIYzj1C`TB+YbU55&7>Oz#YA z;ps_HRXzFjy-Ho_MN8Bt#g!`6`Stu0sq( z?7<7$q*8YT$9L{M_ug~QJ>Rp})Z}B}naX~C?-%V1^GAHK9=6ihy9A8~jKB~^a0t$C zI%b{3IqM>>S(dP~9N~EEcYV`6>n3iV>0(YW0vlum?wr$Hfq0hP5znUL6Vmadl;T(9 zL{b8%kz`!u<5DWVmXfq&TH#mHiM5m*^?i$^*OLiZ<(Jl!IF6{imabyTysRus%kqk> zXd^t4rTD!OUQ!bL{ChLjvQgi2+&sb>?3H9(GuUfMRWn>u%7)>6Zxxr6QW1yYO-P!o zC0FFQNva7cPoTN?8Gr}OZH74D^iIJ+T!NFZg6lSS+kM+J=Hy^}%!#LcpCw+QQ{Zkl z2yXcIz`yr)!(Z^OV&g^Q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kq+>|D^6enN9xAf98dUY46$fGyY?R_JLyKz)q;QaANHD{g=x_BQH2-IQnnb zUV54E3FzGEzhHG{uI+l6BjK&9Td_h*U%}h=#gGH9m|C2>&^YXZEo*XckYF16g#`HqkYF_0yn)eB6=@izUhX@9Ly`a@4tni& zg=wsO!Vn?9{~N`08|F`7F%@HDxFt8!d$Pn|)cK1=eyWTP=$sxpR}7t}UgC@%I8zL~ z`NG4ZJ!dQS9Q^MwBnqsd?aRwt#8GklK&q2!`E%q>qzyl%DAI}ypHh6HXnypBwqF## zzb2(BBQ2u1lq9N_N-FS$0fs%Im`KM(k>F)PjIR-b%aL|`<(5)uNi!n=sv@qWq7gik zjcIt(lygMEIqjmTYVhGTE=n4Fi@m!Bm0egKEfJLxQ%%vl69i~GR0F`jGQVff?Xo^D zm`&u)=3Tk*pDQmJczw~ua)a3zFoql4Zl^z=nm>h`cm9ICyZ%-#l1t>zZoBg1kCj~p zUO#Dni9fr;e(reoom~cg@^SjJEx*LK-EbS{%U#L0=HvOU$8#?kc-(exf62i6i)fhZ&$aF{@bjtpQ;6LxEZ!-IcMFN-g1D?N-qT~rzaYZyq?_|?-N^Q3 z)$Gv2JD)S~Y91R8I|pgf8vGh=ZDSSu5M?@{45Um)H%-uHP}bD(%6% | +| Facebook | 0.07% | 0.5-1% | >1% | +| Twitter/X | 0.05% | 0.1-0.5% | >0.5% | +| LinkedIn | 2.0% | 3-5% | >5% | +| TikTok | 5.96% | 8-15% | >15% | + +### Engagement Rate Formula + +``` +Engagement Rate = (Likes + Comments + Shares + Saves) / Reach × 100 +``` + +Alternative (by followers): +``` +Engagement Rate = (Likes + Comments + Shares) / Followers × 100 +``` + +### By Industry + +| Industry | Instagram | Facebook | LinkedIn | +|----------|-----------|----------|----------| +| Retail | 1.0% | 0.08% | 1.8% | +| Technology | 0.9% | 0.06% | 2.5% | +| Healthcare | 1.5% | 0.12% | 2.2% | +| Finance | 0.8% | 0.05% | 2.8% | +| Food & Beverage | 1.8% | 0.15% | 1.5% | +| Travel | 1.4% | 0.10% | 1.9% | +| B2B Services | 0.7% | 0.04% | 3.2% | + +--- + +## Click-Through Rate Benchmarks + +### Organic CTR by Platform + +| Platform | Average CTR | Good CTR | Excellent CTR | +|----------|-------------|----------|---------------| +| Instagram | 0.22% | 0.5-1% | >1% | +| Facebook | 0.90% | 1.5-2.5% | >2.5% | +| Twitter/X | 0.86% | 1.5-2% | >2% | +| LinkedIn | 0.44% | 1-2% | >2% | +| TikTok | 0.30% | 0.5-1% | >1% | + +### Paid Ad CTR by Platform + +| Platform | Average CTR | Good CTR | Excellent CTR | +|----------|-------------|----------|---------------| +| Facebook Ads | 0.90% | 1.5-2% | >2% | +| Instagram Ads | 0.58% | 1-1.5% | >1.5% | +| LinkedIn Ads | 0.44% | 0.8-1.2% | >1.2% | +| Twitter Ads | 1.55% | 2-3% | >3% | +| TikTok Ads | 0.84% | 1.5-2% | >2% | + +--- + +## Cost Benchmarks + +### Cost Per Click (CPC) + +| Platform | Average CPC | Low CPC | Industry Range | +|----------|-------------|---------|----------------| +| Facebook | $0.97 | <$0.50 | $0.50-$2.00 | +| Instagram | $1.20 | <$0.70 | $0.70-$3.00 | +| LinkedIn | $5.26 | <$3.00 | $3.00-$8.00 | +| Twitter | $0.38 | <$0.25 | $0.25-$1.00 | +| TikTok | $1.00 | <$0.50 | $0.50-$2.00 | + +### Cost Per Thousand Impressions (CPM) + +| Platform | Average CPM | Low CPM | Industry Range | +|----------|-------------|---------|----------------| +| Facebook | $7.19 | <$5.00 | $5.00-$15.00 | +| Instagram | $7.91 | <$5.00 | $5.00-$15.00 | +| LinkedIn | $33.80 | <$20.00 | $20.00-$50.00 | +| Twitter | $6.46 | <$4.00 | $4.00-$12.00 | +| TikTok | $10.00 | <$6.00 | $6.00-$15.00 | + +### Cost Per Engagement (CPE) + +| Platform | Average CPE | Good CPE | +|----------|-------------|----------| +| Facebook | $0.12 | <$0.08 | +| Instagram | $0.15 | <$0.10 | +| LinkedIn | $0.80 | <$0.50 | +| Twitter | $0.08 | <$0.05 | +| TikTok | $0.10 | <$0.06 | + +--- + +## Content Type Performance + +### Instagram + +| Content Type | Avg Engagement | Best Use Case | +|--------------|----------------|---------------| +| Reels | 1.95% | Discovery, viral potential | +| Carousels | 1.92% | Education, storytelling | +| Single Image | 1.18% | Product showcase | +| Stories | 0.5% swipe-up | Time-sensitive, behind-scenes | + +### Facebook + +| Content Type | Avg Engagement | Best Use Case | +|--------------|----------------|---------------| +| Video | 0.26% | Brand awareness | +| Photo | 0.12% | Quick updates | +| Link | 0.05% | Traffic driving | +| Status | 0.04% | Community engagement | + +### LinkedIn + +| Content Type | Avg Engagement | Best Use Case | +|--------------|----------------|---------------| +| Document/PDF | 3.5% | Thought leadership | +| Native Video | 2.8% | Personal brand | +| Image | 2.0% | Announcements | +| Text Only | 1.8% | Professional insights | +| Link | 1.2% | Content sharing | + +### TikTok + +| Content Type | Avg Engagement | Best Use Case | +|--------------|----------------|---------------| +| Trending Sound | 8-12% | Discovery, virality | +| Tutorial | 6-10% | Education, value | +| Behind-Scenes | 5-8% | Authenticity | +| Product Demo | 4-7% | Conversion | + +--- + +## Posting Time Optimization + +### Best Posting Times by Platform + +**Instagram:** +- Best days: Tuesday, Wednesday, Thursday +- Best times: 11 AM, 2 PM, 7 PM (local time) +- Worst: Sunday mornings + +**Facebook:** +- Best days: Wednesday, Thursday, Friday +- Best times: 9 AM, 1 PM, 4 PM +- Worst: Weekends before noon + +**LinkedIn:** +- Best days: Tuesday, Wednesday, Thursday +- Best times: 7-8 AM, 12 PM, 5-6 PM +- Worst: Weekends + +**Twitter/X:** +- Best days: Wednesday, Thursday +- Best times: 8 AM, 12 PM, 5 PM +- Worst: Late night (after 10 PM) + +**TikTok:** +- Best days: Tuesday, Thursday, Friday +- Best times: 7 PM, 8 PM, 9 PM +- Worst: Early mornings + +### Posting Frequency + +| Platform | Minimum | Optimal | Maximum | +|----------|---------|---------|---------| +| Instagram | 3/week | 1-2/day | 3/day | +| Facebook | 3/week | 1/day | 2/day | +| LinkedIn | 2/week | 1/day | 2/day | +| Twitter | 1/day | 3-5/day | 10/day | +| TikTok | 3/week | 1-3/day | 5/day | + +--- + +## ROI Calculation + +### Standard ROI Formula + +``` +ROI = ((Revenue - Cost) / Cost) × 100 +``` + +### Social Media ROI Components + +| Metric | Formula | +|--------|---------| +| Cost Per Click (CPC) | Total Spend / Total Clicks | +| Cost Per Engagement (CPE) | Total Spend / Total Engagements | +| Cost Per Thousand (CPM) | (Total Spend / Impressions) × 1000 | +| Return on Ad Spend (ROAS) | Revenue / Ad Spend | +| Customer Acquisition Cost (CAC) | Total Spend / New Customers | + +### Engagement Value Estimation + +| Action | Estimated Value | +|--------|-----------------| +| Like | $0.50 | +| Comment | $2.00 | +| Share | $5.00 | +| Save | $3.00 | +| Click | $1.50 | +| Follow | $10.00 | + +**Total Engagement Value:** +``` +Value = (Likes × $0.50) + (Comments × $2.00) + (Shares × $5.00) + (Saves × $3.00) + (Clicks × $1.50) +``` diff --git a/marketing-skill/social-media-analyzer/analyze_performance.py b/marketing-skill/social-media-analyzer/scripts/analyze_performance.py similarity index 100% rename from marketing-skill/social-media-analyzer/analyze_performance.py rename to marketing-skill/social-media-analyzer/scripts/analyze_performance.py diff --git a/marketing-skill/social-media-analyzer/calculate_metrics.py b/marketing-skill/social-media-analyzer/scripts/calculate_metrics.py similarity index 100% rename from marketing-skill/social-media-analyzer/calculate_metrics.py rename to marketing-skill/social-media-analyzer/scripts/calculate_metrics.py