Before you start
- Any Shopify plan works. Editing theme code isn't limited by plan.
- The theme needs to be one you own. If you're trying a paid theme before buying it, Shopify won't let you edit its code.
- Your snippet from Websites in the Pidge inbox.
<script>window.$pidge = []; window.PIDGE_WEBSITE_ID = "YOUR-WEBSITE-ID";</script> <script src="https://app.pidge.chat/client/l.js" async></script>
Your own copy is in the Pidge inbox under Websites, in Code for your website, with your website ID already filled in. Copy it from there.
Add the snippet
- In your Shopify admin, go to Online Store → Themes.
- Next to your current theme, click the … button and choose Duplicate. This gives you a copy to go back to if something goes wrong.
- Next to the current theme again, click … and choose Edit code.
- In the Layout folder, open
theme.liquid. - Find
</body>near the end of the file. Ctrl+F (Cmd+F on a Mac) helps. Paste the snippet on the line just above it. - Click Save.
List your domains in Pidge
The chat only connects on domains you've listed for the website. In the inbox, open
Websites and put each domain on its own line in
Domains. Subdomains are included, so example.com also
covers www.example.com.
Add your own domain, like example.com, and your store's Shopify address,
like yourstore.myshopify.com. Use the full Shopify address. Listing just
myshopify.com would match every Shopify store, not only yours.
Pages it doesn't reach
- Checkout. Shopify's checkout doesn't use your theme, so the chat isn't there. The same goes for the Thank you and Order status pages.
- Customer accounts. If your store uses Shopify's newer customer accounts, those pages are hosted by Shopify and don't load theme code.
- The password page. While the store is password protected, most themes show that page with a separate layout, so the chat isn't on it. Enter the password, then look.
The chat does show on your home page, collections, products, cart, pages and blog.
Check that it works
- Open your store in a private window. If it's password protected, enter the password first.
- The chat bubble should be in the bottom corner. Send yourself a message and answer it from the inbox.
- In the inbox, the website's Not installed yet label goes away after the first visit from a listed domain.
If the bubble shows but the chat won't connect, the domain you're on isn't in the website's list in Pidge. If there's no bubble at all, the snippet isn't on the page, or the platform is still serving an older copy of it.
Later on
The snippet lives in one theme. If you switch themes, or install a new version of your
theme, open theme.liquid in the new one and add it again.
Shopify's own guide: help.shopify.com/en/manual/online-store/themes/theme-structure/extend/edit-theme-code
Other platforms
Stuck, or did a step look different on your screen? Tell us in the chat on this page.