Before your contacts can receive messages from you through Messenger, they must opt in by clicking the Facebook opt-in button.
You can display this opt-in button on either a landing page or one of the pages on your website.
After your contacts opt-in, they are given a value for their FBOPTIN_XXX contact data field. This value is confirmation of your contacts' opt-in, and without it, they can't be sent messages from you through Facebook Messenger.
Before you start
Things you need to know:
You can display this opt-in button on either a Dotdigital landing page or one of the pages on your website.
After your contacts opt in, they are given a value for their FBOPTIN_XXX contact data field. This value is confirmation of your contacts' opt-in and without it, they can't be sent messages from you through Messenger.
Learn more about Messenger opt-outs in Program messaging channel: Allowing contacts to opt out of Messenger.
Display the Facebook opt-in button on a landing page
Don't have Surveys, pages, and forms?
If Surveys, pages, and forms aren't active on your account, contact us to discuss activating this feature or display the Facebook opt-in button on your own website.
There are two steps in the process:
1. Insert the Facebook opt-in code in your page
Go to Connect > Digital marketing channels, and select Messenger.
Select a Messenger profile.
Copy the Facebook opt-in code from the Messenger profile.
Learn more in Program messaging channel: Messenger.On your landing page, select a text building block and then select the Edit HTML icon
Remove any existing code from the block, and paste the <div> element of the Facebook opt-in code into the block.
Top Tip
By default, the button is aligned with the left of the page. To align your opt-in button with the centre of the landing page, replace the code in the block with the following:
<div style="text-align: center;"><div style="display: inline-block;" id="divFBMessenger" class="fb-send-to-messenger" messenger_app_id="" page_id="" data-ref="" color="blue" size="large"></div></div>
Expand the UTILITIES drop-down menu and select Add tracking code.
Select Other.
Paste the <script> element of the Facebook opt-in code into the Other tracking code field.
For Tracking code position, select Bottom of the <body>, and select APPLY.
Publish your landing page.
Learn how in Publish a page or form.
2. Add a landing page link to an email campaign
Your Facebook opt-in button is displayed on your landing page only if the URL in the landing page link contains an email address. If that email address is not in one of your lists, the email address is not opted in to Messenger.
Create a new email campaign or edit an existing one.
In EasyEditor, drag and drop a button into your email campaign.
Select Add a link, and select Link to a page to add a link to your landing page.
Select INSERT and make a note the numerical ID in the button URL.
Expand the UTILITIES drop-down menu and select Edit source.
Select inside the code block, then use CTRL + F (or Cmd + F on a Mac) to bring up the search field, and search for the numerical ID from the button URL.
Add the following query to the end of the button URL: ?email=@EMAIL@. The URL appears twice; make sure you add the query string to both occurrences.
The @EMAIL@ placeholder is replaced with a contact's email address when you send the campaign.
Select SAVE.
Finish designing your campaign, then send it to your desired contacts.
Display the Facebook opt-in button on your own website
To display the Facebook opt-in button to contact’s through your own website:
1. Insert the Facebook opt-in code in the source code of your website
Go to Connect > Digital marketing channels, and select Messenger.
Select a Messenger profile.
Copy the Facebook opt-in code from the Messenger profile.
To learn more, check out the article Program messaging channel: Facebook Messenger.
Paste this code into the HTML of a page on your website and make a note of the URL for this page.
You might need your web developers to help you with this.
2. Add your website's link to an email campaign
Your Facebook opt-in button is displayed on a page of your website only if the URL in your website's link contains an email address. If that email address is not in one of your lists, the email address is not opted into Facebook Messenger.
Create a new email campaign or edit an existing one.
In EasyEditor, drag and drop a button into your email campaign
Select Add a link, and select Hyperlink.
Learn how in Insert links into your campaign.
Add the following query to the end of the link URL: ?email=@EMAIL@.
The @EMAIL@ placeholder is replaced with a contact's email address when you send the campaign.Finish designing your campaign, then send it to your desired contacts.