Bot Links and Ref Parameters
Estimated Reading Time: 1 Minute
m.me is a shortened URL service operated by Facebook that redirects users a bot in Messenger. You can use them on your website, email newsletters, and more.
In addition to giving you a way to link to your bot, the Messenger Platform also supports the passing an arbitrary parameter via these links.
This can be used for many purposes, such as tracking different links placed in different channels or tying a Messenger user to a session or account in an external app. You can even use it to direct the user to specific content or features available within the bot.
An m.me link with an added parameter looks like this:
How to create a m.me link with a referral parameter.
Go to Tools > m.me Links and REF Parameter and click the “Add Ref” button
For this illustration, we’ll select a Ref Link for Elegant Bots’ Free Chatbot Course.
The ref is “freecourse” and we selected the flow “FreeChatbotCourse”.
Note: You can also select other bot response such as “Text Response or a “Step”. Nonetheless, for this illustration we’ll use what’s normally used – a Flow. So, we’ll select the flow “FreeChatbotCourse”.
When you hit the “Save” button, a ref link is already created as shown on the image below.
To get your “Ref Link”, simply click on the 3 dots and click on “Get Link’.
The generated “Ref Link” is the string below.
If you follow the “Ref Link”, it will route you to the flow “FreeChatbotCourse”, as shown on the image below.
In the link shown below, freecourse is the ref parameter. You can replace freecourse with any word such as facebook-post, youtube, button-in-bottom.
How to save payload data to a custom field
You can append any data to an m.me link and when the user clicks in your link the data is saved into a custom field. Append “–payload” at the end of the URL, where the payload is any data you want to save to a custom field. For example:
On the above link 456 is the payload and it can be saved to the custom field “Course Code”. See the image below.
Note: Please create the custom field on Flows>Custom Fields.
How to pass multiple payload in m.me links
You can append as many values and save it to multiple custom fields. Below is the format.
That’s it! Enjoy…