We are using telegram bot to post advertisiment messages in channels. Ad message always has a text and inline keyboard button in reply markup. This button is a link to promoted resource. We want to track button clicks but there is a problem. As described here, button must contain exactly one of optional parameters - it means, that there will be no callback query if we use url for button. So, the qustion is - is there any cheating way to track clicks and keep button being link?
Current metod is adding layer on our server. Button is moving to our page on server, that redirects to final url. But it is very bad - often link is other telegram channel link and user's browser is opened, when there' is no need.
You need any shorten URL service like botanio for example.
Start chat with Botan in Telegram for getting token wich required in GET request and follow bot's recomendations. It can be helpful not only for URL track but for any click also.
As the alternative you also may use Google URL Shortener, Bitly or many others.