A Django-based platform for tracking, analyzing, and storing user behavior data. This project provides a RESTful API for logging and analyzing user interactions, designed to work efficiently with large-scale applications and provide insights into user engagement patterns.
- 📈 Track User Behavior: Log various user actions (e.g., page views, clicks, engagement duration).
- ⚙️ API-Driven: RESTful API for easy integration with front-end applications and mobile apps.
- 💾 Data Storage: Supports both SQL and NoSQL databases for storing analytics data.
- 🔍 Data Insights: Provides the foundation for analyzing user behavior to improve user experience.
- 🔒 Secure: Built with secure authentication and authorization practices.
- Backend: Django, Django REST Framework
- Database: PostgreSQL (for relational data), MongoDB (optional for NoSQL)
- Cloud Integration: Ready for AWS and other cloud platforms
- API Testing: Postman
-
Clone the repository:
git clone https://github.com/saeidsaadatigero/user-behavior-analytics-platform.git cd user-behavior-analytics-platform
-
Install dependencies:
pip install django djangorestframework psycopg2-binary
-
Set up the database:
- Configure PostgreSQL or MongoDB connection in
settings.py
.
- Configure PostgreSQL or MongoDB connection in
-
Run migrations:
python manage.py migrate
-
Start the server:
python manage.py runserver
-
Access the API at http://127.0.0.1:8000/api/behavior/
You can use Postman or similar tools to test the API endpoints.
To log a user action, send a POST request to /api/behavior/
with a JSON payload like:
{
"user_id": 1,
"action": "viewed_page",
"metadata": {
"page": "homepage",
"duration": "5 seconds"
}
}
user-behavior-analytics-platform/
├── behavior/ # Django app for user behavior tracking
├── api/ # API views and serializers
├── settings.py # Django settings
├── urls.py # URL routing
├── requirements.txt # Project dependencies
└── README.md # Project README
This project is licensed under the MIT License.
Developed by Saeid Saadatigero. If you have any questions or suggestions, feel free to reach out at [email protected].