The objective of this project was to create a reusable Django application to track clicks on any link such as Affiliate Link, File Downloads, Social Link. The application should be easy to integrate into existing Django projects and provide useful features like rate limiting, IP filtering, and geolocation.
Implemented two separate integration methods: a template tag (`track_url`) for traditional Django templates and a DRF API view (`TrackClickAPIView`) for JavaScript-based frontends.
Used Django's `INSTALLED_APPS` and optional dependencies in `pyproject.toml` (`extras`) to allow users to install and enable only the features they need, such as DRF and rate limiting support.
For template-based views, the Django messages framework is used to display an error to the user. For the DRF API, a custom exception (`RateLimited`) is raised and handled by a DRF exception handler to return a `429 Too Many Requests` response.