#trigger a redirect

1 messages · Page 1 of 1 (latest)

solid axle
#

Are you using 11labs widget or something else?

cunning sigil
#

Hi @solid axle Yes, I'm using 11labs widget.

solid axle
#

Can you share your code, without any IDs?

cunning sigil
#

Yes, getting that now. Thank you!

#

My site is built on Wordpress.. ive added a header/footer plugin. Here's what I have in the header:
<elevenlabs-convai agent-id="My Agent ID Goes Here"></elevenlabs-convai>
<script src="https://elevenlabs.io/convai-widget/index.js" type="text/javascript" async></script> (HTML)

Here's what I have in my Footer for the listener:

document.addEventListener('DOMContentLoaded', () => {
const widget = document.querySelector('elevenlabs-convai');
if (!widget) return;

widget.addEventListener('elevenlabs-convai:call', event => {
event.detail.config.clientTools = {
redirectToExternalURL: ({ url }) => {
window.location.href = "https://homeserviceagents.com/get-free-quote";
}
};
});
}); (JAVASCRIPT)

and here's my widget embed code: <elevenlabs-convai agent-id="My Agent ID Goes Here"></elevenlabs-convai><script src="https://elevenlabs.io/convai-widget/index.js" async type="text/javascript"></script>

solid axle
#
  1. Does the tool name in your code match the one in the agent configuration?
  2. Can you put a console.log before window.location.href in order to check whether this function is being executed? (by opening browser console and checking if that log is there)
cunning sigil
#
  1. Yes, my tool name in my code matches the agent config. Both are "redirectToExternalURL"

  2. Will try to do this step right now. Thank you!

solid axle
#

Also check in your network tab whether the embed script is actually loading in properly

cunning sigil
#

Im not really sure how to check for either step 2. or how to check the network tab for these things you mentioned. Is there a way I can give you my login details? Thanks

solid axle
#

No login details please. You can look up on the internet how to use browser built-in developer tools. Unfortunately it's too much to go over

cunning sigil
#

Maybe I can provide a screenshot of what Im seeing on both, console and network tab?

solid axle
#

You can but triple check that your screenshots don't contain any sensitive information

cunning sigil
#

Will do.. thanks for the heads-up on that as well!

#

This is a bit to technical for me to follow or to know what I'm looking for/at. I appreciate your help @solid axle Is there a customer service number for 11labs where I can speak to some one by any chance? Thank you for your help!

solid axle
cunning sigil
#

Thanks again @solid axle !!

cunning sigil
#

Hi @solid axle I wanted to thank you for your help yesterday, i was finally able to get the redirect to start working. I wanted to say, as the redirect is happening.. my Assistant is talking, but she gets cut off in the midst of the transfer/redirect. Is there a way to maintain her talking while the user is being redirected to my quote page? Thanks again!

solid axle
#

Probably not since there's most likely no way to control the audio buffer when using the widget

#

Maybe your redirect function triggers a page reload which leads to the conversation end