Subtitle: Building a full-stack analytics dashboard that ingests Google/Meta/TikTok ad data and translates ROAS/CTR into plain-English business advice.
The hardest part of data analytics isn't collecting the numbersβit's interpreting them. Marketing managers stare at spreadsheets full of ROAS, CPC, and CTR, but they often ask, "So, is this good or bad?"
I built Adlytix AI to answer that question. It is a Streamlit-based marketing analytics dashboard that ingests CSV/Excel data from Google Ads, Meta, and TikTok, and automatically generates human-readable business insights using the Anthropic Claude API.
Live deployment: https://adlytix-ai.streamlit.app/
The Architecture
Data Ingestion: Users upload CSV/Excel files. The backend (Python/Pandas) automatically detects column structures and cleans the data.
Metric Calculation: The engine computes ROI, ROAS, CPC, and CTR dynamically.
The Generative Layer (The Magic): The structured metrics are passed to a pre-engineered prompt that asks Claude to:
Identify the Top 3 Best Performing campaigns and explain why.
Identify the Bottom 3 Worst Performing campaigns and suggest actionable fixes.
Summarize the overall health of the marketing portfolio.
Visualization: Plotly renders interactive charts showing trends.
The Prompt Engineering Strategy
Getting Claude to generate accurate insights was the hardest part. If you just dump a Pandas DataFrame into the prompt, the LLM gets confused.
My successful prompt structure:
System Role: "You are a Senior Marketing Analytics Consultant. You speak plainly. Do not use jargon unless absolutely necessary."
Data Injection: Insert the summarized table (mean/median performance) rather than raw rows to save tokens.
Constraint: "If the data suggests a campaign is underperforming, provide 3 specific reasons why it might be happening (e.g., low audience targeting, high competition, poor creative)."
Output Format: Enforce a strict structure: ### Key Takeaways -> ### Campaign Deep Dive -> ### Actionable Recommendations.
The Impact (User Feedback)
I deployed this to a small group of 5 early-stage startup founders. The feedback was phenomenal:
65% reduction in time spent interpreting dashboard metrics. They said they used to spend 2 hours analyzing the spreadsheet; now they spend 5 minutes reading the AI summary and 30 minutes acting on the recommendations.
The "Why" factor: They loved that the AI didn't just flag the losing campaign but hypothesized why it was losing (e.g., "Campaign X has a high CPC relative to the average. This suggests increased competition for these keywords.").
Research Caveats and Lessons
Hallucination in Numbers: Claude occasionally misreads a number if the CSV has formatting issues (e.g., "$1,000" vs "1000"). I mitigated this by standardizing all numbers to floats before passing them to the prompt.
Generic Advice: If you don't give the LLM enough context about the industry, it gives generic advice. I added an optional input field where the user can specify their industry (e.g., "SaaS B2B") which significantly improved the relevance of the generated insights.
Cost: For small dashboards (500 rows), the cost per insight generation is negligible (<$0.01). For massive datasets, I use aggregation first to avoid high token costs.
Conclusion
Can LLMs replace the dashboard? No. Dashboards are for monitoring; LLMs are for translating. Adlytix AI proves that LLMs are incredibly effective at bridging the gap between complex data science and practical business decision-making.
This project is open-source on my GitHub, so feel free to fork it and add your own connectors!
Author: Sultan Ali Khan | AI/ML Engineer |
sultanalikhan7543
/
adlytix-ai
AI Marketing Analytics Dashboard
π Adlytix AI β AI Marketing Analytics Dashboard
Stop guessing. Start knowing.
Upload your ad performance data (Google Ads, Meta, TikTok) and get instant metrics + AI-powered insights in seconds.
β¨ Features
- π Upload CSV or Excel ad exports from any platform
- π Auto-calculates ROI, ROAS, CPC, CTR
- π Interactive charts (ROAS, Spend vs Revenue, CTR, CPC)
- π€ AI-generated plain-English insights powered by Claude
- π Best and worst campaign detection
- π‘ Zero setup required
π Live Demo
π§° Built With
- Python 3
- Streamlit
- Pandas
- Plotly
- Anthropic Claude API
π How to Run Locally
git clone https://github.com/YOUR_USERNAME/adlytix-ai.git
cd adlytix-ai
pip install -r requirements.txt
streamlit run app.py
Add your ANTHROPIC_API_KEY to a .env file.
π Sample File Format
| Campaign | Spend ($) | Clicks | Impressions | Revenue ($) |
|---|---|---|---|---|
| Summer Sale | 500 | 1200 | 45000 | 2100 |
π¬ Contact
Built by Sultan Ali Khan Β· sultanalikhan0344@gmail.com
Top comments (0)