Ability to capture current URL from Webchat
# 👀feature-requests
s
Scenario A user clicks on an ad that directs the user to a website. The link embedded in this ad has UTM parameters. The Chatbot is embedded on the the website. The Chatbot captures the current URL to parse out the UTM parameters During the interaction with chatbot, the user provides their name and email. The chatbot sends both the lead data and the UTM parameters to the CRM. Description Marketers run various campaigns across different channels, including Google Ads, Facebook Ads, LinkedIn Ads, and email marketing, among others. To analyze the performance of each channel and make data-driven decisions, they incorporate UTMs into their links. It is crucial to provide clients with the source of leads captured within a chatbot. Neglecting to do so is a significant mistake that can eventually be noticed by clients. Therefore, it is essential to make it a must-have feature.
a
As a marketer, I can confidently speak about the importance of this aspect 🙂
i
As a business owner I can attest! Its a common feature in commercial chatbots such as drift. Not only does it allow me to capture more data, but I can direct the flow of the bot depending on what URL the user is on.
s
As the person who initially received Andrew's question I can confidently say he is the marketer to go to if you have questions about UTM importance. I'm just learning about it more myself. Thanks for the great insight Andrew!
a
up
a
This is super important but one year later, it seems nothing happened 😦
b
yeah this isn’t really that hard either - for web just pass along the searchparams
w
Webchat may have two variables or tags: -
event.tags.conversation['webchat:currentUrl']
-
event.tags.conversation['webchat:referralUrl']
b
hmm
w
Sorry i means should have,
b
oh it doesn’t
it should have a params object yeah
of the invokong browser query string
this used to work and now apparebtly it doesnt
or its just not documented anywhere
w
p
Indeed
window.botpress.updateUser()
is the corrent answer 🙂
b
okay
.init({… user: { data } })
apparently that’s how you do it
wondering where it says that in the docs
w
Is it possible that the
inject.js
code is collecting the URL information and making it accessible through
event.tags.conversation['webchat:urlData']
or other variable?
4 Views