An intelligent marketing automation system that provides real-time campaign optimization, performance analytics, and AI-powered insights for digital marketing campaigns across multiple platforms.
- Interactive performance metrics visualization
- Multi-platform campaign tracking (Google Ads, Facebook, Instagram, LinkedIn)
- Key performance indicators: ROAS, CTR, conversion rates, CPC
- Dynamic filtering by date range, platform, and campaign
- Intelligent campaign optimization recommendations
- Automated performance analysis and alerts
- Predictive analytics for revenue forecasting
- Budget allocation suggestions based on ML algorithms
- Time-series revenue trending
- Platform performance comparisons
- Interactive charts and graphs using Plotly
- Responsive design for all device types
- Multi-campaign performance monitoring
- Automated reporting and insights generation
- Real-time budget optimization alerts
- Performance benchmarking across platforms
- Frontend: Streamlit, HTML5, CSS3
- Backend: Python 3.13
- Data Processing: Pandas, NumPy
- Visualization: Plotly, Plotly Express
- AI Integration: OpenAI API
- Machine Learning: Scikit-learn
- Deployment: Streamlit Cloud
- Version Control: Git, GitHub
- Python 3.13+
- OpenAI API key (optional, for AI features)
-
Clone the repository
git clone https://github.com/JP-source-do/marketing-ai-automation.git cd marketing-ai-automation -
Install dependencies
pip install -r requirements.txt
-
Set up environment variables (optional)
# Create .streamlit/secrets.toml for local development mkdir .streamlit echo 'OPENAI_API_KEY = "your-api-key-here"' > .streamlit/secrets.toml
-
Run the application
streamlit run streamlit_app.py
-
Open your browser to
http://localhost:8501
- Filters Panel: Use the sidebar to filter data by date range, platforms, and campaigns
- Key Metrics: View real-time performance indicators at the top of the dashboard
- Analytics Charts: Analyze trends with interactive revenue and ROAS visualizations
- Campaign Details: Review detailed performance data in the expandable table
- AI Insights: Get intelligent recommendations and predictions
- Click "Generate AI Campaign Suggestions" for personalized optimization recommendations
- Review automated insights for budget reallocation opportunities
- Monitor performance predictions and growth forecasts
The application includes realistic sample data demonstrating:
- 365 days of campaign performance data
- 4 major platforms: Google Ads, Facebook, Instagram, LinkedIn
- Multiple campaigns with varied performance metrics
- Realistic ranges for impressions, clicks, conversions, and revenue
# .streamlit/secrets.toml
OPENAI_API_KEY = "your_openai_api_key_here"
GOOGLE_ADS_API_KEY = "your_google_ads_key_here"
FACEBOOK_API_KEY = "your_facebook_key_here"
LINKEDIN_API_KEY = "your_linkedin_key_here"- Modify
generate_sample_data()function to connect real data sources - Customize AI prompts in the insights generation section
- Adjust chart styling and branding in the CSS section
- Add new platforms or metrics as needed
| Metric | Description |
|---|---|
| ROAS | Return on Ad Spend - Revenue divided by spend |
| CTR | Click-Through Rate - Percentage of impressions that result in clicks |
| CVR | Conversion Rate - Percentage of clicks that result in conversions |
| CPC | Cost Per Click - Average cost for each click |
| Revenue | Total revenue generated from campaigns |
| Spend | Total advertising spend across all platforms |
The platform integrates with OpenAI's GPT models to provide:
- Intelligent campaign analysis
- Automated optimization suggestions
- Performance prediction algorithms
- Natural language insights generation
- Real-time API integrations with ad platforms
- Advanced machine learning models for prediction
- Automated campaign optimization execution
- Email/Slack notifications for performance alerts
- A/B testing framework integration
- Custom dashboard creation tools
- Multi-user access and permissions
- Advanced reporting and export features
- API keys stored securely using Streamlit secrets management
- No sensitive data stored in repository
- Environment-based configuration for different deployment stages
- HTTPS encryption for all data transmission
This project is licensed under the MIT License - see the LICENSE file for details.
Paul Nicolasora
- GitHub: @JP-source-do
- LinkedIn: John Paul Nicolasora
- Email: boyculet1@gmail.com
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
- Streamlit team for the amazing framework
- OpenAI for powerful AI capabilities
- Plotly for excellent visualization tools
- The open-source community for inspiration and resources
β If you found this project helpful, please give it a star! β