Skip to main content

Hey all. We use Shopify + Intercom. We currently already have Intercom integrated and working.

We are looking to achieve a simple thing and seem to be getting nowhere. How/where in Shopify do we go to make it so that we can code a button to activate the Intercom messenger to open up?

Most websites have buttons like “Chat Now” that would activate their chat widget.

Hey Yusuf, Diogo from Nortrez here! Understanding a little of the context I thought of something, try this ↓

You can use the showNewMessage JavaScript method. Add a button to your Shopify theme where you want the chat to appear. Use the onClick event of the button to trigger the Intercom Messenger.
Implement the JavaScript code to open the Messenger. Here's an example of how to set it up:
<button onclick="Intercom('showNewMessage');">Chat Now</button>
This code will create a "Chat Now" button that opens the Intercom Messenger when clicked. You can also pre-populate the message composer if needed:
<button onclick="Intercom('showNewMessage', 'How can I help you today?');">Chat Now</button>
This will open the Messenger with a pre-filled message.

Hope it helps :)


Reply