max_tracking_links
Make a separate tracking link (and promo code) for every channel where an ad is placed in MAX, so you can see which placement brought users and sales. Bot links use ?start=: the id arrives in bot_started.payload, which works even for clicks that never leave the messenger. Returns a media plan as CSV. Then feed the counts to max_ad_report.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"campaign": "<campaign>",
"placements": "<placements>"
},
"name": "max_tracking_links"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| lang | No | Answer language: 'en' English, 'ru' Russian. Pick the user's language; default ru (or XONTA_MAX_LANG) | |
| bot_name | No | Your bot's public name: each placement gets max.ru/<bot>?start=<id> | |
| campaign | Yes | Campaign name, e.g. 'black friday' | |
| site_url | No | Landing page: each placement gets UTM tags and its erid | |
| placements | Yes | Channels where the ad goes: [{name, cost?, erid?}]. name may be a title or max.ru link | |
| utm_medium | No | seeding | |
| promo_codes | No | Also make one promo code per placement | |
| mini_app_bot | No | Bot with your mini-app: each placement gets ?startapp=<id> |