E
E
Ernest Faizullin2021-01-07 16:34:52
Chats
Ernest Faizullin, 2021-01-07 16:34:52

Ideas on how to track link clicks in telegram?

How to track the fact of clicking on a button with a link?

This is important for statistics. It would be cool to catch this action on the webhook. But as far as I know, there is no such event.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
I
Ivan Vorobei, 2021-01-07
@ivanvorobei

The link leads to your server, where you count the opening. After redirect.

F
Feelosov, 2022-02-15
@Feelosov

It works only for private chats, because when switching to public via the link, the TG does not send a response to the bot. Tested on a normal transition from the browser, on the link in the message - not on the button.
There is a method in the TG approvechatjoinrequestthat allows the bot to approve the entry into the channel via a link, if such a link was made with the requirement to approve the entry.
Unfortunately, this method did not work for me with a post-request on hooks. Already in despair, I made a get-request and the bot approved the user.
Why am I talking about this method. To what is createChatInviteLink, which creates a link and when using it for a private group chat / channel, returns [chat_join_request]a , in which both the user data and the link.
That is, the user follows the link, the bot receives information, approves the user.
There is no other option at the moment. You can temporarily, while some kind of promotion is going on, make a public group private and count referrals, transitions, fix time, etc. in this way.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question