Capture user URL

(Izzy) #1

For the web bot, looking for ideas on how I can capture the users URL to set/use as an attribute

(Nathan Stults) #2

The users URL is already automatically captured for web bots as an attribute on the flow trigger, using the key “hostUrl”


(Izzy) #3

I meant the referring URL (e.g. the URL they are visiting when the web bot appears)

(Nathan Stults) #4

Yes, if your bot is embedded in a webpage using the snipped technique (i.e. not the hosted bot page in an iframe) then the URL in hostUrl will be the page on which the bot script is hosted, not the bot URL itself.

(Nathan Stults) #5

My example probably wasn’t the best to use because the sample was accessed via the hosted bot page, but that was just a coincidence in the screenshot I took.

(Izzy) #6

YES! The script code version (not iFrame) of the web widget does capture the URL. exactly what I needed.