Skip to main content
Contributor ⭐️⭐️⭐️⭐️
Nov 22, 2024 4:40 PM UTC
Solved

Embeddable widget and javascript code

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?

 

olimarrio
olimarrioAnswer
Gainsight Employee ⭐️
Dec 6, 2024 1:03 PM UTC

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
Gainsight Employee ⭐️
olimarrioAnswer
Gainsight Employee ⭐️
Dec 6, 2024 1:03 PM UTC

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!

Translate
jwrenAuthor
Contributor ⭐️⭐️⭐️⭐️
Dec 6, 2024 10:33 PM UTC

Thanks ​@olimarrio 

Translate