Developer Tools
Telegram Chat Widget for Shopify, WordPress and Websites
Builds a floating Telegram chat button for Shopify, WordPress or any site, linked to your username, bot or group.
Telegram Chat Widget Generator tool
Result ready.
Live preview
Done for you
Hire us to place and customize your widget
Kwebby installs the widget on your Shopify, WordPress or custom site, customizes it to match your theme and brand, keeps it clear of cart and cookie bars, and tests it on phones. You get a fixed quote before any work starts.
- Placement on every page, or only the pages you choose
- Custom colors, fonts, mascot and messages
- Tested on desktop, iPhone and Android
Install your widget
Pick where your site runs. Each tab has the code and the exact steps.
Add your Telegram username, bot, group link or number in step 1 first. Without it, the button cannot open a chat.
Option 1 works in every Shopify theme and takes about 2 minutes.
- In Shopify admin, open Online Store > Themes.
- Next to your live theme, click the three dots (...) and choose Edit code.
- Under Layout, open
theme.liquid. - Find the closing
</body>tag near the end of the file (press Ctrl+F or Cmd+F). - Paste the code below on the line just above
</body>and click Save. - Open your store in a new tab. The Telegram button shows on every page.
Shopify embed code
<!-- Telegram Chat Widget: free generator at https://kwebby.com/telegram-chat-widget -->
<script>
window.KwebbyTG = {
"contact": "username",
"username": "",
"message": "Hi! I have a question about {title}",
"mode": "popup",
"title": "Chat with us",
"subtitle": "Usually replies within an hour",
"greeting": "Hi there! How can we help you today?",
"cta": "Start chat",
"callout": "Questions? Message us on Telegram",
"calloutDelay": 4,
"color": "#2AABEE",
"header": "#229ED9",
"headerText": "#ffffff",
"theme": "light",
"layout": "classic",
"button": "circle",
"icon": "logo",
"label": "Message us",
"size": 60,
"radius": 16,
"animation": "pulse",
"position": "br",
"mobilePosition": "br",
"x": 20,
"y": 20,
"mobileX": 16,
"mobileY": 16,
"devices": "all",
"autoOpen": 0,
"badge": true,
"track": true
};
</script>
<script src="https://kwebby.com/embed/telegram-widget.js" async></script>
<!-- End Telegram Chat Widget -->Option 2: no code editor (Custom Liquid section)
- Open Online Store > Themes > Customize.
- In the left panel, scroll to the Footer group and click Add section.
- Choose Custom Liquid, paste the same code, and click Save.
The footer group appears on every page, so the button does too. Shopify checkout pages do not load theme code, so the button never covers the payment form.
About the Telegram Chat Widget Generator
A Telegram chat widget puts a floating Telegram button in the corner of every page, so a visitor can message you in one click. Kwebby's free generator builds one for Shopify, WordPress or any website: link your Telegram username, bot, group or phone number, pick a design, a mascot and a screen position, and copy one block of embed code. You can also download the files as a zip or as a ready-made WordPress plugin.
Key Takeaways
- The generator creates a floating Telegram chat button and chat popup for Shopify, WordPress, WooCommerce, Wix, Squarespace, Webflow and plain HTML sites.
- The button can open a chat with your username, a phone number, a Telegram bot (with a start parameter) or a private group or channel invite link.
- Pasted
@nameandt.melinks are cleaned automatically, and a Test it link checks the chat before you install. - A setup agent reads your store description or URL and writes the greeting, quick replies and button text, then picks a design, colors and a mascot.
- You choose from 30 Telegram designs, 3 popup layouts, 4 button shapes, 13 mascots, 5 animations and 5 screen positions, with separate settings for phones.
- The prefilled message can include the product name and link with
{title}and{url}for username and phone links. - The widget is free, needs no account, loads in about 12 KB and sends no visitor data to Kwebby.
What Is a Telegram Chat Widget?
A Telegram chat widget is a small button that stays fixed in a corner of the screen while visitors scroll. A click opens a chat popup with your greeting, and a second click opens Telegram on the visitor's phone or computer with your chat ready. The widget uses public t.me links, so it needs no Telegram API key, no bot server and no monthly plan.
Telegram is a strong support channel for stores and creators that sell in Eastern Europe, Central Asia, the Middle East, India and crypto or tech communities, where many customers already use Telegram every day. A visible chat button answers questions at the moment a visitor hesitates, and the conversation stays in the app your customers prefer.
How the Telegram Widget Generator Works
- Describe your store (optional). Type what you sell or paste your store URL. The setup agent writes your greeting, prefilled message and quick replies, and picks a design, brand colors and a mascot.
- Choose where chats go. Pick Username, Phone number, Bot or Group or channel invite, then paste the name or link. You can also add up to 5 team members, each with their own username.
- Write your messages. Edit the popup title, status line, greeting, prefilled message, quick replies and teaser bubble.
- Pick a design. Start from 30 ready-made Telegram designs, then change colors, the light or dark theme, the popup layout, the button shape, the icon and the animation.
- Add a mascot. Choose one of 13 mascots for the popup header, or use the mascot as the floating button with a small Telegram badge.
- Place the button. Click a spot on the desktop and phone screens, set the distance from the edges and hide the button on pages such as
/cartor/checkout. - Set behavior and install. Choose popup or direct mode, business hours and click tracking, then copy the code or download the zip.
The live preview shows the widget on a sample store page in desktop and mobile sizes. Every change appears in the preview right away.
Telegram Link Types the Widget Supports
| Link type | Example | Best for | Prefilled message |
|---|---|---|---|
| Username | t.me/yourshop |
Personal or business accounts, public groups and channels | Yes |
| Phone number | t.me/+447700900123 |
Accounts without a username | Yes |
| Bot | t.me/ShopHelpBot?start=from_website |
Support bots, order bots and AI assistants | No, the bot shows a Start button |
| Invite link | t.me/+AbCdEf123 |
Private groups and private channels | No |
A username link is the most reliable choice. Set a username in Telegram under Settings > Edit profile > Username. Usernames have at least 5 characters and use letters, numbers and underscores.
A phone number link opens your chat only when your privacy settings let people find you by number. Check Settings > Privacy and Security > Phone Number > Who can find me by my number.
A bot link sends the visitor to your bot. The optional start parameter, up to 64 letters, numbers, underscores or dashes, reaches your bot with the /start command, so the bot knows the chat came from your website.
An invite link opens a private group or channel. For a public group or channel, use its username instead.
How to Add a Telegram Chat Widget to Shopify
Option 1: Paste the Code in theme.liquid
- In Shopify admin, open Online Store > Themes.
- Next to your live theme, click the three dots (...) and choose Edit code.
- Under Layout, open
theme.liquid. - Find the closing
</body>tag near the end of the file with Ctrl+F or Cmd+F. - Paste the embed code on the line just above
</body>and click Save. - Open your store in a new tab. The Telegram button shows on every page.
Option 2: Use a Custom Liquid Section (No Code Editor)
- Open Online Store > Themes > Customize.
- In the left panel, scroll to the Footer group and click Add section.
- Choose Custom Liquid, paste the same code and click Save.
The footer group appears on every page, so the button does too. Shopify checkout pages do not load theme code, so the button never covers the payment form.
Keep the Button Clear of the Sticky Cart Bar
Many Shopify themes show a sticky Add to cart bar on phones. In the Placement step, set the phone distance from the bottom to about 80 px. The preview has a sticky cart bar to test against.
Telegram Chat Widget Code Example
Here is what the generated code looks like. The first script holds your settings, and the second loads the widget.
<!-- Telegram Chat Widget: free generator at https://kwebby.com/telegram-chat-widget -->
<script>
window.KwebbyTG = {
"contact": "username",
"username": "yourshop",
"message": "Hi! I have a question about {title}",
"title": "Chat with us",
"greeting": "Hi there! How can we help you today?",
"color": "#2AABEE",
"position": "br"
};
</script>
<script src="https://kwebby.com/embed/telegram-widget.js" async></script>
<!-- End Telegram Chat Widget -->
The username value is your Telegram username without the @ sign. For a bot, set "contact": "bot" and add "start". For a private group, set "contact": "invite" and "invite" to the part after t.me/+. Use the generator to get the complete code with your design.
How to Add a Telegram Chat Widget to WordPress
Option 1: Upload the Plugin Zip
- Download the WordPress plugin zip from the Install panel.
- In WordPress admin, go to Plugins > Add New Plugin > Upload Plugin.
- Choose
kwebby-telegram-widget-wordpress.zip, click Install Now, then Activate.
The plugin holds your design and loads the widget script from your own site. It works with WooCommerce and any theme.
Option 2: Paste the Code with WPCode
- Install a free code snippet plugin such as WPCode (Insert Headers and Footers).
- Open Code Snippets > Header & Footer.
- Paste the embed code into the Footer box and click Save Changes.
How to Add a Telegram Chat Widget to a Custom Website
Copy the embed code and paste it just before the closing </body> tag of every page, or once in your shared footer template. Then publish and reload your site.
- Wix: Settings > Custom code > Add custom code, place it in Body - end and apply it to all pages.
- Squarespace: Settings > Advanced > Code injection > Footer.
- Webflow: Site settings > Custom code > Footer code, then publish.
- React or Next.js: put the config in a script tag and load the script once in the root layout with your framework's script component.
Design Options
| Option | Choices |
|---|---|
| Ready-made designs | 30, from Telegram Classic and Night Mode to Crypto Dark, Luxury Gold and Toy Box |
| Popup layout | Classic chat, Minimal, Profile card |
| Theme | Light or dark, with Telegram's chat colors |
| Button shape | Circle, rounded square, pill with text, side tab |
| Button icon | Telegram logo, chat bubble or mascot |
| Mascots | 13, including support agents, a robot, cat, owl, fox, panda, penguin and chef |
| Animation | Pulse, bounce, shake, glow or none |
Visitors who turn on reduced motion in their system settings never see the animation.
Placement Options
Pick bottom right, bottom left, bottom center, middle right or middle left on desktop, and bottom right, bottom left or bottom center on phones. Set the distance from the side and bottom separately for each screen size. You can show the button on all devices, phones only or desktops only, and hide it on any page path.
Behavior, Business Hours and Tracking
- Popup or direct mode: open the chat popup first, or open Telegram on the first click.
- Auto-open: open the popup by itself after a set number of seconds, once per visit.
- Notification badge: a red 1 on the button until the visitor opens it.
- Business hours: pick days, hours and a time zone. Outside those hours the popup shows Away and your offline message, or the button hides.
- Click tracking: each chat click sends a
telegram_clickevent to Google Analytics 4 and Google Tag Manager, and aContactevent to the Meta Pixel, when those tools run on your site. Nothing is sent to Kwebby.
Hosted Embed Code vs Download Zip
| Hosted embed code | Download zip | |
|---|---|---|
| Setup | Paste one block of code | Upload the script, then paste the snippet |
| Updates and fixes | Automatic | Download again to update |
| Loads from | kwebby.com (cached, about 12 KB gzipped) | Your own server or theme |
| Best for | Most Shopify, WordPress and custom sites | Strict privacy or content security policies |
| WordPress | Paste with WPCode | Installable plugin zip |
Hire Kwebby to Install It
Kwebby can place and customize the widget for you. We install it on your Shopify, WordPress or custom site, match it to your theme, set up your Telegram username, bot or group link, keep the button clear of cart bars and cookie banners, and test it on phones and desktops. Click Hire us to place it under the live preview, and the quote form opens with your widget design attached. You get a fixed quote before any work begins.
Kwebby also builds and redesigns online stores. See web development and the website cost calculator for larger projects.
Related Kwebby Tools
- WhatsApp Chat Widget Generator builds the same floating chat button for WhatsApp, with a phone number and country code picker.
- QR Code Generator creates a QR code for your
t.melink, for packaging, flyers and shop counters. - Open Graph Generator sets the preview image and title that Telegram shows when someone shares your page.
- Social Stats Checker builds share links for the main social networks.
- Website Cost Calculator estimates the cost of a new store or website with AI.
Final Thoughts
A Telegram chat button turns questions into conversations in the app your customers already use. Link your username, bot or group, pick a design that fits your brand, place the button clear of your cart bar and paste one block of code. If you would rather not touch your theme, hire Kwebby to place and customize it for you.
FAQ
Frequently asked questions
How do I add a Telegram chat button to my website?
Build the widget on this page, copy the embed code and paste it just before the closing </body> tag of your site. On Shopify, paste it in theme.liquid. On WordPress, upload the plugin zip or paste the code in the footer box of WPCode.
Is the Telegram chat widget free?
Yes. The generator, the hosted embed code, the zip download and the WordPress plugin are free, with no signup and no message limits. The popup shows a small "Free Telegram widget by Kwebby" credit link.
Do I need a Telegram bot to use the widget?
No. The widget opens a normal Telegram chat with your username or phone number. A bot is optional: pick Bot in step 1 if you already run a support or order bot.
Can the widget prefill a message in Telegram?
Yes, for username and phone number links. Telegram types the prefilled message into the chat box, and the visitor presses send. Add {title} and {url} to include the product name and link. Bot links and invite links open without a typed message.
Can I link a Telegram group or channel?
Yes. For a public group or channel, pick Username and enter its @name. For a private group or channel, pick Group or channel invite and paste the invite link from Group info > Invite links.
Why does my Telegram phone number link not open a chat?
Telegram opens a chat from a phone number link only when your privacy settings allow people to find you by number. Change Settings > Privacy and Security > Phone Number > Who can find me by my number, or use a username instead.
Can I add more than one Telegram account?
Yes. Turn on "Route chats to team members" and add up to 5 people, each with a name, role, Telegram username and avatar. The popup lists them, and each opens a chat with that person.
Does the Telegram widget slow down my site?
No. The script is about 12 KB gzipped, loads with the async attribute after your page content, and draws inside a shadow DOM, so your theme CSS and the widget never affect each other.
Kwebby builds software too
Need a website or app built?
Get 50% off your first project. The discount applies to your first fixed quote only. Kwebby has delivered 1,200+ projects on fixed quotes from $100.