Extendy / SmartyURL

SmartyURL is a PHP-based web application for Smart URL management, Sharing, shortening, and analytics, featuring smart redirects.
https://docs.smartyurl.extendy.net/
MIT License
12 stars 2 forks source link

Feat: Implement feature to distinguish between direct URL visits and QR Code requests #83

Open ghost opened 10 months ago

ghost commented 10 months ago

Currently, SmartyURL does not provide a way to distinguish between requests to 'Go' Controller originating from direct link visit and those originating from QR Codes. This can be a limitation for scenarios where it is important to know the source of the request, such as when tracking user behavior or implementing targeted promotions.

To address this limitation, we propose implementing a feature that allows SmartyURL to identify the source of each request. This can be done by parsing the HTTP referrer header or by adding additional query string to QR Image to determine when someone is coming from QR by analyzing the query string. If the referrer header contains a QR Code URL, we can assume that the request originated from a QR Code scan.

The ability to distinguish between direct URL and QR Code requests would provide several benefits, including:

I believe that this feature would be a valuable addition to SmartyURL and would greatly enhance its functionality.

Implementation:

The proposed feature can be implemented by parsing the HTTP referer header in the incoming request. If the referer header contains a QR Code URL, the request can be identified as originating from a QR Code scan (with known query string that added to QR Image). then store the his as QR Code hit.