TG-Staff 团队 avatar TG-Staff 团队

Telegram Bot Customer Service Diversion Link Setup Tutorial: Using Magic Links with Google/Bing Ads for Attribution

telegram-bot-cs Routing Links Ad Attribution UTM Parameters TG-Staff

Telegram Bot Customer Service Diversion Link Setup Tutorial: Use Magic Links with Google/Bing Ads for Attribution

In cross-border B2B SaaS, Web3, or overseas marketing scenarios, Telegram Bot customer service has become a core channel for handling user inquiries. However, many teams face a thorny issue: when users click on ads via Google Ads or Bing Ads and directly jump to the Telegram Bot, you cannot track which ad or keyword the user came from. The ad attribution chain is completely broken in the Telegram ecosystem, making it impossible to determine which channel drives effective inquiries or optimize ad ROI.

The key to solving this is to configure diversion links (also known as magic links) for your Telegram Bot customer service. This article will guide you step-by-step on how to create diversion links in TG-Staff, add UTM parameters, and integrate with Google Ads and Bing Ads for complete ad attribution.

The traditional ad attribution process is: user clicks ad → landing page (website) → source recorded → user inquiry. But in the Telegram scenario, the process becomes: user clicks ad → directly jumps to Telegram Bot → source information lost. Telegram itself does not provide any ad source tracking capabilities, so you cannot know if the user came from Google Search, Facebook ads, or other channels.

Diversion links serve as a bridging solution to this broken chain. Their working principle is:

  1. User clicks an ad and first lands on a short link from the TG-Staff official domain.
  2. The short link page captures key user information (IP, browser, URL parameters) in milliseconds.
  3. It then immediately redirects the user to your Telegram Bot and automatically sends a preset message.

For B2B SaaS teams, this means accurately evaluating the inquiry conversion rate of different keywords; for Web3 and overseas teams, it means distinguishing the traffic-driving effects of different social media channels and ensuring timely handling of peak ad traffic through subsequent customer service diversion rules. Without diversion links, you might be wasting half of your ad budget without ever knowing which half.

A diversion link is essentially a short link generated by TG-Staff. It does not directly point to the Telegram Bot but acts as a data collection and redirect intermediary. When a user visits this link, the system records visitor environment information and then automatically redirects the user to your Bot, triggering a preset welcome or menu message.

Diversion links can capture the following three types of key data, which are recorded in the TG-Staff user profile:

  • Network Information: User’s IP address (can be used to determine geographic location).
  • Device Information: Browser User-Agent (OS, browser type, device model).
  • URL Parameters: All query parameters appended to the link, including UTM parameters (utm_source, utm_medium, utm_campaign etc.) and Google Ads auto-tagging parameters (gclid).
FeatureRegular Bot Link (e.g., t.me/YourBot)Diversion Link (TG-Staff Magic Link)
Ad AttributionCompletely unable to track sourceCan capture UTM, gclid, IP, User-Agent
User ProfileNoneAutomatically records visitor info, forming a queryable user profile
Session RoutingNot supportedSupports “round-robin” or “online-first” rules, accurately assigning to agents
Redirect FlowDirectly redirects to BotFirst collects data, then redirects to Bot (milliseconds, no impact on conversion)
Use CaseDaily sharingAd campaigns, multi-channel traffic, event tracking

The following steps are based on the TG-Staff console interface (https://app.tg-staff.com/). Before starting, ensure you have registered an account and bound a Bot project.

Prerequisites

The split-link feature requires the Standard plan or above. It can be used during the free trial period, but after the trial ends, you need to subscribe to the Standard plan (see the official website for pricing) to continue using it.

  1. Log in to the TG-Staff console, and in the left navigation bar, find and click “Diversion Links”.
  2. Click the “Create Diversion Link” button in the top right corner.
  3. In the pop-up window, select the Bot project you want to associate (one diversion link can only be associated with one project).
  4. (Optional) Set a remark name for the link, such as “Google Ads - Brand Keywords”, for easier management later.
  5. Click “Confirm” or “Create”, and the system will automatically generate a short link like https://app.tg-staff.com/{code}.

Step 2: Configure Session Diversion Rules

The real value of a diversion link is that it can precisely allocate ad traffic to idle online agents. You need to configure diversion rules for this project.

  1. In the console, go to “Project Settings” → “Diversion Settings” in the left navigation bar.
  2. Select the diversion mode:
    • Round Robin: The system assigns new sessions to authorized agents in order. Suitable for teams with stable agent numbers and balanced workload.
    • Online First: Assigns to currently online agents first. When all agents are offline, it falls back to round robin. This is the recommended choice for ad reception scenarios, ensuring that users clicking ads are immediately taken over by online customer service.
  3. Specify the agent scope: You can choose “All Agents” or “Specific Agents” to limit which agents can receive sessions from ad traffic.
  1. Go back to the “Diversion Links” page and click the copy icon next to the link.
  2. Open Incognito mode in your browser, paste the link, and visit it.
  3. Normally, you will see the page flash briefly (data collection), then automatically redirect to your Telegram Bot and pop up a preset welcome message.
  4. Go back to the TG-Staff console’s “User Profile” or “Session List”, and you should see a new visitor record containing the test IP and browser information.

Capturing UTM parameters is one of the core capabilities of the diversion link. Simply append UTM parameters to the generated diversion link in standard format.

Standard UTM Parameter Structure:

你的分流链接?utm_source=来源&utm_medium=媒介&utm_campaign=活动名称&utm_term=关键词&utm_content=创意内容

Example: Suppose your diversion link is https://app.tg-staff.com/abc123, and you want to add UTM for a Google Ads brand keyword campaign, you can write:

https://app.tg-staff.com/abc123?utm_source=google&utm_medium=cpc&utm_campaign=brand_keywords&utm_term=tg-staff

Recommended Practice

It is recommended to unify UTM naming conventions within the team. For example:

  • utm_source should be fixed to platform names like google, bing, facebook.
  • utm_medium should be fixed to cpc (paid search), social, email, etc.
  • utm_campaign should use readable names like product_launch_q1.

Unified naming conventions allow you to easily filter and compare traffic quality from different channels in TG-Staff Professional’s user profiles.

Configuring Attribution for Google Ads and Bing Ads

To enable attribution, set the diversion link with UTM parameters as the ad’s final URL.

  1. Log in to Google Ads and navigate to the campaign you want to configure.
  2. In the ad group, create or edit an ad and locate the Final URL field.
  3. Paste your diversion link with UTM parameters, for example: https://app.tg-staff.com/abc123?utm_source=google&utm_medium=cpc&utm_campaign=brand_keywords.
  4. It is strongly recommended to enable Google Ads Auto-tagging. Go to SettingsAccount settingsAuto-tagging and select “Add Google Ads tag to my URL.” Once enabled, Google automatically appends the gclid parameter to the URL. The diversion link preserves it, allowing you to identify traffic from Google Ads in TG-Staff.
  5. Save the ad and wait for approval.

Bing Ads Configuration Steps

  1. Log in to Bing Ads (Microsoft Advertising) and find the corresponding campaign and ad.
  2. In the Final URL field of the ad, paste your diversion link with UTM parameters.
  3. Bing Ads also supports UTM parameters. You can enter them manually or use the Custom Parameters feature to add them automatically. Manual entry is recommended for consistent naming.
  4. Watch out for URL encoding: If your UTM parameters contain Chinese characters or special characters (e.g., keywords), ensure they are properly URL-encoded (e.g., spaces encoded as %20). Bing Ads usually handles this automatically, but manual verification is safer.
  5. Save and enable the ad.

How to View Ad Attribution Data and User Profiles?

When a user clicks your ad, enters the bot via the diversion link, and starts a conversation, TG-Staff Pro records the complete information in the User Profile.

  1. In the console, go to User Profile from the left navigation bar.
  2. Find users who entered through ads (you can quickly locate them by UTM parameter values).
  3. Click the user’s avatar or name to view details. You will see:
    • Basic Info: User ID, Telegram nickname, first conversation time.
    • Source Tracking: Displays the complete original URL parameters, including utm_source, utm_medium, utm_campaign, gclid, etc. Use this to determine which ad channel the user came from.
    • Device Info: IP address, browser User-Agent, operating system.
    • Session History: All conversation records of the user.

With this data, you can do three important things:

  • Evaluate Channel Quality: Compare conversation duration and conversion rates of users from different utm_source values to decide ad budget allocation.
  • Optimize Keywords: Check the utm_term (keyword) corresponding to user inquiries to determine which keywords bring more precise user needs.
  • Refine Operations: Adjust welcome messages or bot menu content based on user location (IP) or device.

FAQ

Q: Does the diversion link support UTM parameters?

A: Yes. Users can manually append UTM parameters (e.g., ?utm_source=google&utm_medium=cpc) to the diversion link generated by TG-Staff, and the system will automatically capture and record them in the user profile.

Q: Does the diversion link work with Google Ads Auto-tagging?

A: Yes. Google Ads Auto-tagging automatically adds the gclid parameter to the URL. The diversion link does not block these parameters, and the user profile retains the original URL parameters.

Q: Does the diversion link’s redirect speed affect ad conversion?

A: The diversion link is a short URL under TG-Staff’s domain, with extremely fast redirect speed (usually milliseconds), and does not significantly negatively impact ad conversion rates. Users barely notice the redirect.

Q: Can I use the diversion link with the free version?

A: You can use the diversion link during the free trial. After the trial ends, you need to subscribe to the Standard plan or above to continue using it. Please refer to the official website for pricing.

Q: Can I use the same diversion link for multiple projects?

A: Each diversion link can only be associated with one project (bot), but you can create multiple diversion links for different projects.


Act Now: Sign up for free at TG-Staff (https://app.tg-staff.com/), experience a 3-day full-feature trial, create your first diversion link, and configure it in Google Ads.

Read More: Check the official documentation (https://docs.tg-staff.com/) to learn more advanced configurations for diversion links, such as custom redirect behavior.

Need Help: Contact the support bot (@tgstaff_robot) for real-time assistance.