How do I transfer UTM tags from a website to a bot?

Let's imagine a situation: you have a website, a bot, and an advertising campaign. You have created a beautiful landing page for your bot on the website. Users from various advertising platforms visit this page.

When some users leave, you see these bounce rates in Google Analytics and Yandex Metrica. Other users launch your bot, and if the bot's link has a tag, for example, as I described in this article, then in the best case, you will know that this user came from the website.

But you won't understand from which advertising platform the user came and ultimately which advertising campaign brought more profit.

The question arises...

How to pass UTM tags from the user's address bar to the bot?

We have developed a JavaScript script that can be installed on your website in 2 minutes and solves this problem.

How does it work?

For each user, the script creates a unique temporary token. Various user data, current UTM tags, some additional parameters, etc., are tied to this token.

Then the script modifies all bot links on the current page by adding the previously created token to them. When a user clicks on such a link and launches your bot, our platform detects this token and attaches the previously collected data to the user.

For example, transferred UTM tags from the website will go straight to our UTM report.

What else can this feature do?

  1. The platform automatically determines the user's location and time zone.
  2. Additional parameters can be used in the bot link besides start.

For example, from the link https://t.me/Graspil_bot?from=site&page=blog, additional parameters from and page will be collected, and they will be included in the UTM report along with links from the address bar.

It's better to see it once

This script is installed on our website, and you can check how it works by launching our bot. We have attached an additional parameter to this link to our bot and asked our bot to send users with this parameter the information it received from you.

Originally, the link looks like this:

https://t.me/Graspil_bot?demoUtm=on&u_source=graspil_blog&u_content=sendUtmfromSite

If you look at the link now, you will only see the start parameter with the token. The demoUtm parameter has already been sent to our server, and when you launch the bot through this link, it will see that there is a token, check the data associated with this token, and if it finds demoUtm, it will send you a message with the information it received.

Several more features are under development, for example:

  1. The ability to retrieve collected data via an API.
  2. Attach additional parameters to the user, such as your user_id.

If you are interested in these features, let us know.

You can get more detailed information and the actual code in your personal account on our platform.