Jump to content

Show Facebook Messenger chat on some pages not all

Recommended Posts

Site URL: https://livingfabulously.com/invite-sleep-fabulously-sound-circle

I installed the FB messenger code-injection in the site footer however when you're on a mobile device where I want someone to subscribe the chat logo is persistently blocking the button or the recaptcha check box.

How can I show the Facebook Messenger chat only on some pages not all?

Thanks everyone!

This is the code-injection I'm using

<!-- Load Facebook SDK for JavaScript -->
      <div id="fb-root"></div>
      <script>
        window.fbAsyncInit = function() {
          FB.init({
            xfbml            : true,
            version          : 'v7.0'
          });
        };

        (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_GB/sdk/xfbml.customerchat.js';
        fjs.parentNode.insertBefore(js, fjs);
      }(document, 'script', 'facebook-jssdk'));</script>

<!-- Your Chat Plugin code -->
      <div class="fb-customerchat"
        attribution=setup_tool
        page_id="1114362698615277"
  theme_color="#10e4f6"
  logged_in_greeting="So good you're here! If you have any questions, pls let me know 🌸"
  logged_out_greeting="So good you're here! If you have any questions, pls let me know 🌸">
      </div>

Link to comment
  • Replies 2
  • Views 671
  • Created
  • Last Reply

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Squarespace Webinars

Free online sessions where you’ll learn the basics and refine your Squarespace skills.

Hire a Designer

Stand out online with the help of an experienced designer or developer.