Skip to main content
Solved

Embeddable widget and javascript code

  • November 22, 2024
  • 2 replies
  • 58 views

  • Contributor ⭐️⭐️⭐️⭐️

Hey there,

Question about the embeddable widget (conversational) and the external links function. We can obviously add URLs to the external links, but is there any way to use the same button-like functionality (similar to external link) to call a specific function via javascript code?

 

Currently, we use javascript to call up a chat function and I’m curious if there’s a way to include that within the widget itself. *Not the chat, just a button (similar to external link) that will call the function to open the chat.

 

Does anyone have experience with this?

 

Best answer by olimarrio

Hey ​@jwren 👋,

Theoretically, you should be able to add an external link and then add some JavaScript in whatever location you are adding the Embeddable Widget to (e.g. your application, your website). This JavaScript would need to include a function that targets the specific element of the external link you have added, so that upon click, your chat function is called.

Let us know how you get on!

2 replies

olimarrio
Forum|alt.badge.img+5
  • Gainsight Employee ⭐️
  • Answer
  • December 6, 2024

Hey ​@jwren 👋,

Theoretically, you should be able to add an external link and then add some JavaScript in whatever location you are adding the Embeddable Widget to (e.g. your application, your website). This JavaScript would need to include a function that targets the specific element of the external link you have added, so that upon click, your chat function is called.

Let us know how you get on!


  • Author
  • Contributor ⭐️⭐️⭐️⭐️
  • December 6, 2024

Thanks ​@olimarrio