How to install Facebook Messenger customer chat plugin to Squarespace
Copy-paste the following code to SETTINGS -> ADVANCED -> CODE INJECTION -> HEAD
Note 1! Code above might have changed after writing this blog post so it's best to get the latest version here.
Note2! The correct way is to
use Squarespace developer mode,
FTP to your theme,
open site.region with a text editor (We recommend Sublime Text)
Add the Facebook javascrript SDK code from Facebook Documentation right after the opening <body> -tag like this:
Step 2: Whitelist your domain
If it was this easy, anyone could install your chat on their website. Because of this, you must tell Facebook which websites are allowed to use your Facebook page messenger.
Go to Facebook -> Your Page -> (Facebook Business manager if you're using it to manage youre page) -> Settings -> Messenger platform -> Scroll to "White-listed domains" section and add your website url there. Should look like this:
Step 3: add the Messenger chat plugin code
With Facebook Messenger you can select what is the message to display to visitors.
A great idea is to make this page specific. So if your visitor is reading about your digital marketing services, you'll have a specific Facebook messenger text for that page:
To achieve this, go to Pages in Squarespace. Go to Page settings -> ADVANCED -> PAGE HEADER CODE INJECTION. Copy-paste code below there.
Find your Facebook page id. You can use this tool.
Edit the code above and add your page id. Replace the YOUR-PAGE-ID-HERE with your page id.
Replace the YOUR-GREETING-TEXT-HERE section with the text you want your visitors to see on this page.
If you want to show the same message on every page, you can add the code above just once to YOUR SQUARESPACE SITE -> SETTINGS -> ADVANCED -> CODE INJECTION -> HEADER CODE
Refresh your page and there you have it!
We're a one person business and gotta pay our rents and groceries. Because of this we cannot offer any free 1-on-1 support for our tutorials. If you need help we'll be happy to install messenger for you: