A powerful analytics dashboard for User Generated Content (UGC) campaigns that aggregates and displays ad performance metrics from multiple platforms including Meta (Facebook/Instagram), Google Ads, and TikTok Ads.
- 🔐 Authentication - Secure user authentication with Firebase (Email/Password & Google Sign-In)
- 📊 Multi-Platform Integration - Connect Meta, Google Ads, and TikTok Ads accounts
- 📈 Aggregated Metrics - View combined performance metrics across all platforms
- 🎯 Service-Specific Analytics - Detailed breakdown by individual advertising platform
- 📱 Responsive Design - Works seamlessly on desktop, tablet, and mobile devices
- 🔄 Real-time Data - Firebase integration for real-time data synchronization
- 📉 Interactive Charts - Visualize performance trends with Recharts
- Frontend: React 19 + Vite
- Authentication: Firebase Auth
- Database: Firebase Firestore
- Charts: Recharts
- Icons: Lucide React
- Styling: Custom CSS with responsive design
- Deployment: GitHub Pages
- Node.js 18+ and npm
- Firebase account
- API credentials for Meta, Google Ads, and/or TikTok Ads (optional for testing)
-
Clone the repository
git clone https://github.com/panteleimon-a/ugc_analytics.git cd ugc_analytics -
Install dependencies
npm install
-
Set up Firebase
- Go to Firebase Console
- Create a new project
- Enable Authentication (Email/Password and Google provider)
- Enable Firestore Database
- Copy your Firebase configuration
-
Configure environment variables
cp .env.example .env
Edit
.envand add your Firebase credentials:VITE_FIREBASE_API_KEY=your_api_key VITE_FIREBASE_AUTH_DOMAIN=your_project.firebaseapp.com VITE_FIREBASE_PROJECT_ID=your_project_id VITE_FIREBASE_STORAGE_BUCKET=your_project.appspot.com VITE_FIREBASE_MESSAGING_SENDER_ID=your_sender_id VITE_FIREBASE_APP_ID=your_app_id -
Run the development server
npm run dev
The app will be available at
http://localhost:5173
- Visit the application
- Sign up with email/password or Google account
- You'll be redirected to the dashboard
- Navigate to the Connections tab
- Click "Connect with Meta"
- Log in with your Facebook/Meta account
- Authorize access to your ad accounts
- Select which ad account to connect
- Metrics will automatically populate on your dashboard
Benefits:
- ✅ No need to install Shopify Meta channel app
- ✅ Direct connection to your Meta Ads account
- ✅ Works for merchants selling on any platform
- ✅ Automatic metrics fetching
- Navigate to the Connections tab
- Enter your Shopify store domain (e.g.,
mystore.myshopify.com) - Click "Connect with Shopify"
- The app automatically detects which ad platforms are installed
- Connected services will show with checkmarks
Works when you have:
- Shopify store
- Shopify Meta channel app installed
- Shopify Google channel app installed
- Shopify TikTok channel app installed
- Navigate to the Connections tab → Connect Individual Platforms
- Enter API credentials for each service:
- Meta (Facebook): Get access token from Facebook Developers
- Google Ads: Get API key from Google Ads API Center
- TikTok Ads: Get access token from TikTok Marketing API
- Click Connect for each service
-
Overview Tab: See aggregated metrics across all connected platforms
- Total spend, impressions, clicks, and CTR
- Performance trends over time
- Comparison charts by platform
-
By Service Tab: Detailed metrics for each connected platform
- Platform-specific performance data
- Campaign-level breakdowns
- Visual comparisons
The current version includes a UI framework with mock data for demonstration purposes. To integrate real API data:
-
Meta (Facebook) Ads API
- Documentation: https://developers.facebook.com/docs/marketing-apis
- Required: Access token with
ads_readpermission
-
Google Ads API
- Documentation: https://developers.google.com/google-ads/api/docs/start
- Required: Developer token, OAuth2 credentials
-
TikTok Ads API
- Documentation: https://ads.tiktok.com/marketing_api/docs
- Required: Access token with appropriate permissions
To add real API integration, modify the following files:
src/components/MetricsOverview.jsx- Replace mock data with API callssrc/components/ServiceMetrics.jsx- Implement service-specific data fetchingsrc/components/ServiceConnections.jsx- Add API credential validation
-
Configure GitHub repository
- Go to repository Settings → Pages
- Enable GitHub Actions as the source
-
Add Firebase secrets
- Go to Settings → Secrets and variables → Actions
- Add the following secrets:
VITE_FIREBASE_API_KEYVITE_FIREBASE_AUTH_DOMAINVITE_FIREBASE_PROJECT_IDVITE_FIREBASE_STORAGE_BUCKETVITE_FIREBASE_MESSAGING_SENDER_IDVITE_FIREBASE_APP_ID
-
Deploy
- Push to the
mainbranch - GitHub Actions will automatically build and deploy
- Your app will be available at
https://panteleimon-a.github.io/ugc_analytics/
- Push to the
npm run build
npm run previewComplete documentation is organized in the /docs folder:
- Getting Started: Installation & Setup
- OAuth & Authentication: Meta OAuth Guide, Shopify Integration
- Deployment: Quick Deploy Guide, Full Checklist
- Security: Security Best Practices, Token Encryption
- Testing: Testing Guide
ugc_analytics/
├── .github/
│ └── workflows/
│ └── deploy.yml # GitHub Actions deployment workflow
├── src/
│ ├── components/
│ │ ├── Auth.jsx # Authentication component
│ │ ├── Dashboard.jsx # Main dashboard layout
│ │ ├── MetricsOverview.jsx # Aggregated metrics view
│ │ ├── ServiceMetrics.jsx # Per-service metrics
│ │ └── ServiceConnections.jsx # Platform connection management
│ ├── firebase.js # Firebase configuration
│ ├── App.jsx # Main app component
│ ├── App.css # Main styles
│ ├── index.css # Global styles
│ └── main.jsx # App entry point
├── .env.example # Environment variables template
├── package.json # Dependencies and scripts
├── vite.config.js # Vite configuration
└── README.md # This file
npm run dev- Start development servernpm run build- Build for productionnpm run preview- Preview production buildnpm run lint- Run ESLint
The project uses ESLint for code quality. Run npm run lint before committing.
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
- Never commit API keys or credentials to the repository
- Use environment variables for sensitive data
- The
.envfile is gitignored by default - Use GitHub Secrets for deployment credentials
This project is licensed under the Apache License 2.0 - see the LICENSE file for details.
For issues, questions, or contributions, please open an issue on GitHub.
- Real API integration for Meta, Google, and TikTok
- Advanced filtering and date range selection
- Export reports to PDF/CSV
- Email notifications for performance alerts
- Custom dashboard widgets
- Multi-user account management
- Budget tracking and forecasting
- A/B testing comparison tools