Shopify Installation Guide

Add TGLiveChat to Shopify

Your customers have questions about shipping, sizing, and "is this thing actually in stock?" Let them ask you directly and reply from Telegram.

Your widget script

Copy this from your TGLiveChat dashboard (Widgets page). Your actual widget ID will be pre-filled.

<script src="https://cdn.tglivechat.com/w.js" data-id="YOUR_WIDGET_ID"></script>
1

Method 1: Edit theme.liquid (recommended)

This is the standard way to add any third-party script to Shopify. Takes about 60 seconds.

1

Go to Online Store > Themes

In your Shopify admin, click Online Store in the left sidebar, then Themes.

2

Click Edit Code

Find your current theme, click the three-dot menu (or "Actions"), then select Edit code.

3

Open theme.liquid

In the left panel under Layout, click theme.liquid. This is the main template that wraps every page in your store.

4

Find the </body> tag

Scroll to the very bottom of the file. You're looking for the closing </body> tag. Use Ctrl+F (or Cmd+F on Mac) and search for </body> to find it fast.

5

Paste the script just before </body>

Add a new line right before </body> and paste your script tag:

...
<script src="https://cdn.tglivechat.com/w.js" data-id="YOUR_WIDGET_ID"></script>
</body>
</html>
6

Save

Click Save in the top right. Visit your store in a new tab. The chat widget should be sitting there in the corner, ready to go.

2

Alternative: Shopify Plus Script Editor

If you're on Shopify Plus, you can use the Script Editor app or Shopify's checkout.liquid for more granular control. But honestly, for a chat widget, editing theme.liquid is simpler and works on every Shopify plan.

The Script Editor is more useful when you need conditional logic (like only showing the widget on product pages or for logged-in customers). For most stores, Method 1 is the way to go.

Why Shopify store owners like TGLiveChat

Pre-purchase questions close sales. Someone's staring at a product page wondering about sizing. If they can ask you and get an answer in 30 seconds (because your phone buzzed in Telegram), that's a sale you would've lost.

The widget is tiny. ~10KB gzipped. It won't slow down your store. Page speed matters for Shopify SEO and conversion rates. Some chat widgets add 200KB+ of JavaScript. Not this one.

You're already on your phone. Checking Shopify notifications, replying to emails, managing inventory. Why open another app when Telegram's already right there?

Troubleshooting

Widget doesn't show up after saving

First, hard-refresh the page (Ctrl+Shift+R). Shopify sometimes caches aggressively. Also double-check that you pasted the script in the right place (before </body>, not inside a comment or Liquid block).

Widget shows on the storefront but not in the checkout

Shopify's checkout uses a separate template (checkout.liquid) and is only editable on Shopify Plus. On regular Shopify plans, you can't add custom scripts to the checkout page. The widget will work on all other pages though.

Widget overlaps with Shopify's built-in chat or other apps

If you have Shopify Inbox or another chat app running, disable it first. Go to Settings > Apps and sales channels, find the other chat app, and remove it. Two chat bubbles in the same corner is confusing for customers.

I switched themes and the widget disappeared

Each Shopify theme has its own theme.liquid file. If you switch themes, you'll need to add the script tag to the new theme's theme.liquid too. It takes 30 seconds the second time around.

Password-protected store

If your store is still in development mode with the password page, the widget won't load on the password page itself. It'll work fine once you remove the password or when you're logged in and browsing your store normally.

Something not working?

Chat with us on Telegram