Share feedback, ideas and get community help

Updated 5 months ago

Get URL of host page

At a glance

The community member is looking to get the URL of the host page for an embedded bot, using JavaScript added to the typebot embed code and set along with the other parameters. They are trying to build contextual responses based on the URL the user is on. A community member suggests using a "set variable" block with the custom value document.location.href and enabling the "Execute on client" option. The original community member responds that this is a simple and sensible solution.

I'm looking to get the url of the host page for an embedded bot, using JS added to the typebot embed code and set along with the other parameters. Just looking for feedback, is this the most sensible way to send the url to the bot server? I'm trying to build contextual responses based on the url the user is on.
B
R
2 comments
A set variable block with the following custom value: document.location.href don't forget to enable the "Execute on client" option
Thanks. Simple enough.
Add a reply
Sign up and join the conversation on Discord