How to Add Facebook Messenger to an Unbounce Page

messenger
chat
facebook
#21

Hy have you found a solution to note the chat traffic source…?

@Zoe_Tattersall do you have a solution for detecting message origin?

#22

@Krisztian_Komjati sorry I haven’t looked into this any further.

1 Like
#23

Are you asking about tracking the messages from the webchat vs. other messages? In the code here you can put a unique code/word as the ref_param for tracking purposes.

#25

No problem. Thanks for your response :wink:

1 Like
#26

As you can see messenger provides a solution:

“message”: {
“mid”:“mid.14577641449818:41d102a3e1ae206a38”,
“text”:“hello, from customer chat!”,
“tags”: [
{
“source”: “customer_chat_plugin”
}
]
}

I think this adds a tag automatically to the conversation, instead of adding it manually within the inbox of a facebook page.

My problem is, that I dont really know how to implement this code into the code you posted above… Can you help me out in this?

#27

I can’t seem to get this code to work for me. Messenger doesn’t load, and I am getting this error when I inspect the page. >> https://prnt.sc/m9uc0h

Anyone else experience this?!

#28

Replace this URL https://connect.facebook.net/en_US/sdk.js
to a new one https://connect.facebook.net/en_US/sdk/xfbml.customerchat.js

Example:
(function(d, s, id) {
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) return;
js = d.createElement(s); js.id = id;
js.src = “https://connect.facebook.net/en_US/sdk/xfbml.customerchat.js”;
fjs.parentNode.insertBefore(js, fjs);
}(document, ‘script’, ‘facebook-jssdk’));

#29

Hi there, I’ve found this topic quite interesting!

I`m about to give it a try.
The only thing is… are we able to track chats as conversions?