Open Tars Bot Widget with a Link/Button

@vinit …So, is there a way we could incorporate a startgid feature into this to launch widget from specific gambits? For everyone curious as to what I am referencing, you can find it here. With this feature we could offer multiple buttons down a page that open in the widget at different points in the bot. It would be invaluable to truly integrating a bot into a website, and has so many applications of use it makes my head spin. Can you imagine the potential? Schedule an appointment, pay for a service, complete a process, subscribe to a newsletter, all through your widget on the page launched by clicking a button/link. :star_struck:


Hi @Levi,

Yes, I just added this functionality.

Simply put the Original Bot URL on a link i.e. something like:
(with _startgid param if you want), followed by #tarsbot

So the final URL will be something like these:

and that’s it. Clicking on that link will open the Bot widget with the Bot corresponding to the URL.

This way, you can have multiple bots be opened in the Bot widget using different links on the same page.
You can also open them starting from different gambits, using the _startgid URL param.

Note: if you have simply put #tarsbot in the href of a link, then it will behave as it is. it will simply open the original TARS Bot corresponding to the code snippet that was added on the page.

Also, if you do not add #tarsbot at the end of the URL, then it will be just another link which will simply open the corresponding page and not the bot widget.

Check the links on this page for different settings possible:


This is amazing. I’m going to implement this throughout my current bot system and corresponding webpage like you won’t believe. Thank you for this! Now, time to get to work!

1 Like

I was just testing your links and only the original bot displayed on each. I refreshed the page each time and it loaded the same bot from the start. However on closing out the window and visiting sometime later, it appears to work just fine. Not sure where the hitch came from on my first visit. I also tried to add the link to the website (granted I’m using the html on domain deployment for the bots), but it just launched the main bot and not a bot I linked. I used this link on an image It turns out that if I use the TARS link it works. But like all things, it is still not a simple answer because this particular website has an external link notice that pops up whenever linking to anything outside of the domain. The best case for us would be finding a way to make this work using the bots ending with .html, but just let me know if it is possible or not, and we will find a workaround on our end if need be. Thanks!

1 Like

Hey @Levi,

The initial hitch was because of the browser cache keeping the old file.
Should have mentioned in the post above to clear your browser cache to see the new update.

Yes, you are right. As i mentioned above, in order to link another bot to a #tarsbot link, you need to use the original URL of the Bot with the format of: “

That is the only way, the widget code will recognize that it is infact a link for a bot and not a link for some random page.

I did not understand the use-case where you need to use the on-domain URL of the bot.

1 Like

@vinit gotcha. So the use case in this very particular instance is the government website warns users whenever they are “navigating to an external link.” This wouldn’t be an issue in almost any other case. The problem is the TARS URL is identified as an external link and displays this warning on the webpage. The bot still loads in the widget and works fine, it just leaves users with the awkward box they have to close out of each time. That’s why we originally implemented the bot network using the html code for on domain deployment, so users would not be prompted by the external link notice as they were all part of the internal domain. We are going to look into adding exemptions to our TARS URL links to bypass this issue. We’ll get it figured out!

1 Like

Got it. See how is it behaving when you put #tarsbot links on the page. Since this is not taking the user to another page, but opening the bot on the same page, it might just work.

1 Like

Okay, one step further. Would it be possible to accomplish this same trick using a URL within a bot opened in the widget itself? Then the widget could self-sustain with bot handoffs internally. This would make the widget all powerful, and ensure the fall of humans to botkind. :robot::fist_right::dizzy_face:

1 Like

Hmm, this sounds interesting. Never thought of it.
I’ll check it out, if this can be done.

Thanks @Levi for some cool ideas :smile:

1 Like

Try testing using incognito mode when you can (simulates a cache less browser)

1 Like