#trigger a redirect
1 messages · Page 1 of 1 (latest)
Hi @solid axle Yes, I'm using 11labs widget.
Can you share your code, without any IDs?
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>
- Does the tool name in your code match the one in the agent configuration?
- 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)
-
Yes, my tool name in my code matches the agent config. Both are "redirectToExternalURL"
-
Will try to do this step right now. Thank you!
Also check in your network tab whether the embed script is actually loading in properly
Ok, checking right now.
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
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
Maybe I can provide a screenshot of what Im seeing on both, console and network tab?
You can but triple check that your screenshots don't contain any sensitive information
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!
Thanks again @solid axle !!
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!