Skip to main content
Answered

How to make a "chat now" button on Shopify activate Intercom?

  • 2 February 2025
  • 1 reply
  • 13 views

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.

Best answer by Diogo Silva

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 :)

View original
Did this topic help you find an answer to your question?

1 reply

Diogo Silva
Forum|alt.badge.img
  • Connector
  • 9 replies
  • Answer
  • February 4, 2025

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 :)


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings