Resources

Products

How can I change the position of the web messenger?

Modified on: Mon, 6 Jun, 2022 at 3:42 PM

The web messenger in Freshchat also known as the conversations widget, is used to deliver a convenient and contextual conversational messaging experience for customers. The web messenger is positioned on the bottom-right corner by default. You can change the position to the bottom-left instead.


You can use the following code snippet to do this. Use this code within the body tag of your website.


<script>
window.fcSettings = {
token: "Web_Chat_Token,
host: "https://wchat.freshchat.com",
config: {
headerProperty: {
direction: 'ltr' //will move widget to left side of the screen
}
}
};
</script>
<script src="https://wchat.freshchat.com/js/widget.js" async></script>


Note: You can find your Web_Chat_Token under Admin > Web Messenger Settings > Getting Started > STEP 2.



CSS

<style>
.custom_fc_frame {
right: 50px !important;
bottom: 30px !important;
}
</style>

HTML

<script>
 window.fcWidget.init({
  "config": {
     "cssNames": {
        "widget": "custom_fc_frame"
     }
  },
  "host": "https://wchat.freshchat.com",
  "token": "enter token here"
 });
</script>