DataDude is a cutting-edge web-based analytics and campaign tracking platform designed to:
- Track visits in real-time.
- Manage and monitor campaigns effortlessly.
- Enable deep linking with precision.
Powered by Flask (Python) for backend and vanilla JavaScript for frontend, DataDude delivers a seamless user experience with actionable insights.
π datadude
βββ app.py # Main Flask application
βββ database.py # Database operations and schema
βββ geo_service.py # User agent and device detection
βββ check_db.py # Database testing utility
βββ services/
β βββ tracking_service.py # Visit tracking logic
βββ models/
β βββ campaign.py # Campaign data model
β βββ deeplink.py # Deep link data model
βββ static/
β βββ css/
β β βββ style.css # Global styles
β βββ js/
β βββ analytics.js
β βββ campaign.js
β βββ dashboard.js
β βββ deeplink.js
β βββ track.js
βββ templates/
β βββ analytics.html
β βββ campaigns.html
β βββ index.html
β βββ deeplink.html
βββ visits.db # SQLite database
- SQLite with tables for campaigns and visits.
- Campaign tracking and visit data storage.
- Schema highlights:
CREATE TABLE campaigns (
id INTEGER PRIMARY KEY AUTOINCREMENT,
name TEXT NOT NULL,
short_code TEXT UNIQUE NOT NULL,
original_url TEXT NOT NULL,
type TEXT NOT NULL,
status TEXT DEFAULT 'active',
utm_source TEXT,
utm_medium TEXT,
utm_campaign TEXT,
created_at DATETIME DEFAULT CURRENT_TIMESTAMP
);CREATE TABLE visits (
id INTEGER PRIMARY KEY AUTOINCREMENT,
campaign_code TEXT,
session_id TEXT,
ip_address TEXT,
user_agent TEXT,
referrer TEXT,
visit_data TEXT,
timestamp DATETIME DEFAULT CURRENT_TIMESTAMP,
FOREIGN KEY(campaign_code) REFERENCES campaigns(short_code)
);- Handles real-time tracking.
- Processes user agent, browser, and device detection.
- Extracts geographic and device-specific data from user agents.
- Real-time statistics and mini charts.
- Displays recent activity feed.
- Advanced data visualizations.
- Includes timeline views and filtering.
- CRUD operations for campaigns.
- URL shortening and campaign performance stats.
- URL shortening.
- Campaign attribution.
- Real-time updates and statistics.
- Device and browser detection.
- Geographic insights.
- Time-based analysis.
- Interactive and responsive.
- Error-handling for smoother user experience.
-
Clone the repository:
git clone https://github.com/your-username/datadude.git
-
Install dependencies:
pip install -r requirements.txt
-
Initialize the database:
python check_db.py
-
Run the development server:
python app.py
- GET /api/campaigns - List all campaigns.
- POST /api/campaigns - Create a new campaign.
- GET /api/campaigns/<short_code> - Fetch campaign details.
- PUT /api/campaigns/<short_code> - Update a campaign.
- DELETE /api/campaigns/<short_code> - Delete a campaign.
- GET /api/stats - Fetch analytics overview.
- GET /api/visits - Retrieve visit details.
- POST /track - Record a new visit.
- Group related functionality in services.
- Maintain a clear separation of concerns.
- Implement robust try-catch blocks.
- Log errors for troubleshooting.
- Use descriptive naming conventions.
- Ensure responsive and accessible designs.
-
Database Testing:
python check_db.py
-
API Testing:
- Use tools like Postman.
- Test CRUD operations and validate error handling.
-
Update Configuration:
- Set
DEBUG = Falsein production. - Configure logging and secret keys.
- Set
-
Database:
- Initialize and regularly back up.
-
Server Setup:
- Use a reverse proxy (e.g., Nginx).
- Enable SSL for secure communication.
- Database backups.
- Performance monitoring.
- Log rotation.
- Regularly update dependencies.
- Monitor security advisories.
For technical queries or support:
- Review the documentation.
- Report issues on the issue tracker.
- Contact the development team.
For a better user experience, consider integrating animations using libraries like Lottie or CSS Animations for:
- Page loading transitions.
- Button hover effects.
- Real-time chart updates.
DataDude β Your all-in-one AI-powered campaign tracking and analytics platform. Harness the power of data with ease!
- π― Iβm looking to collaborate on ...
- π€ Iβm looking for help with ...
- π¬ Ask me about ...
- π« How to reach me: ...
- π Pronouns: ...
- β‘ Fun fact: ... -->