Bot link markers: language, Yandex Metrica, ad click

A link to your bot can carry a marker. The platform keeps it on the lead, splits it into fields and sends them in webhooks. A marker lets the agent start the conversation in the right language and lets you tie the lead to a site visit and an ad click.

What the link looks like

The start parameter allows Latin letters, digits, _ and -, up to 64 characters. A longer parameter is not stored at all. WhatsApp has no such parameter.

Markers the platform reads

MarkerMeaningWebhook field
site_<language>The language of the page the client came from. The agent starts the conversation in it. Codes: ru, en, es, pt (or pt-br), id, ar, he, kk, uz.lead.start_language
ym_<ClientID>The visitor's Yandex Metrica ClientID, digits only. It lets you find the lead in Metrica reports and exports.lead.ym_client_id
yclid_<id>A Yandex Direct click.lead.click_id, lead.click_source = yandex
gclid_<id>A Google Ads click.lead.click_id, lead.click_source = google
fbclid_<id>A Meta click.lead.click_id, lead.click_source = meta
ttclid_<id>A TikTok click.lead.click_id, lead.click_source = tiktok
rb_clickid_<id>A VK Ads click.lead.click_id, lead.click_source = vk
msclkid_<id>A Microsoft Advertising click.lead.click_id, lead.click_source = microsoft

How to write them

Examples

The start parameterResult
site_en_ym_1731400000123456789start_language = en, ym_client_id = 1731400000123456789
site_ru_yclid_16234567890123456789start_language = ru, click_id = 16234567890123456789, click_source = yandex
yclid_16234567890123456789_ym_1731400000123456789click_id = 16234567890123456789, click_source = yandex, ym_client_id = 1731400000123456789
promo2026_ym_1731400000123456789ym_client_id = 1731400000123456789. Your own tag in front does not get in the way.
ym_1731400000123456789_springNothing: the marker's value is followed by other text. Put your own tag at the front.
site_deNothing: the language is not on the list. The conversation runs in the agent's language.
123456789Nothing: the platform does not treat a bare number as a click or a ClientID.

Conversation language from the site_ marker

How to add the Yandex Metrica ClientID

Only the counter on your site knows the ClientID, so the page builds the link. Ask the counter for the ClientID and append it to the button's address:

ym(COUNTER_ID, "getClientID", function (clientId) {
  var link = document.getElementById("telegram-button");
  link.href = "https://t.me/your_bot?start=site_en_ym_" + clientId;
});

If the counter is blocked, the link keeps only the language, and the conversation still starts in it. In Metrica the ClientID is shown in the “Visitors and customers” report and in Logs API exports.

Where it shows up

These fields arrive in the lead block of the event webhook and of the lead webhook. A field without its marker is null. On the lead card the markers are shown in the “Traffic source” block.

The first visit wins

The parameter is written to the lead once. Coming again through another link into the same lead does not change start_param or the fields read from it. In MAX the parameter arrives only on the bot's first launch: a client who has already messaged the bot comes without a marker.