TABLE OF CONTENTS


Install Freshchat on your website (logged-out visitors)


Installing the Freshchat conversations widget (web messenger) on your website is easy. It only takes a few minutes, and you can start chatting with your website visitors (people who haven’t logged in).


Note: Note: Navigate to Admin Settings > CRM Tracking Code > Integrate your website > Copy to get the widget code


<script src='//fw-cdn.com/1*****7/2*****4.js' chat='true'></script>


Install Freshchat on your web app and restore conversations across devices (logged-in users)


You can install Freshchat on your web app in a few minutes and start communicating with logged-in users on your website.


You can restore user conversations for logged-in users on your web app whenever they initiate a conversation from a different device or browser. To do this, you must set a unique external ID and restore the ID for every user. 


Use the following code snippet to identify logged-in users and restore conversations across browsers and devices.

<script>
var restoreId = RESTOREID //Which need to be fetched from your DB
window.fcWidgetMessengerConfig = {
externalId: "john.doe1987", // user's id unique to your system
restoreId: restoreId ? restoreId : null
}
window.fcWidget.user.get(function(resp) {
var status = resp && resp.status,
data = resp && resp.data;
if (status !== 200) {
window.fcWidget.user.setProperties({
firstName: "John", // user's first name
lastName: "Doe", // user's last name
email: "john.doe@gmail.com", // user's email address
phone: "8668323090", // phone number without country code
phoneCountryCode: "+1", // phone's country code
plan: "Estate", // user's meta property 1
status: "Active", // user's meta property 2
"Last Payment": "12th August" // user's meta property 3
});
window.fcWidget.on('user:created', function(resp) {
var status = resp && resp.status,
data = resp && resp.data;
if (status === 200) {
if (data.restoreId) {
// Update restoreId in your database
}
}
});
}
});
</script>
<script src='//fw-cdn.com/1*****7/2*****4.js' chat='true'></script>


  • External ID - This has to be unique to each logged-in user. This information should be passed to Freshchat from your side. For example, a user’s email ID can be their external ID.

  • Restore ID - This will be created by Freshchat when a logged-in user (from your web app) initiates a conversation on Freshchat for the first time. Restore ID is also unique to each user. This ID will be passed to your website from Freshchat on the user creation callback function. You need to store this ID in your database. 

The next time the same user starts a conversation through Freshchat from a different browser or app, this restore ID, and the external ID must be passed from your side to Freshchat for the user conversation to be restored. Otherwise, every conversation initiated by the user on a new/fresh browser session will create a new user and the conversation history will be lost.




Install Freshchat on multiple websites (more than one website)

If you have multiple websites, you can still use one Freshchat account across all these sites to engage with your customers and site visitors.


All you have to do is define a unique site ID while adding the Freshchat installation code to these sites, to differentiate users and conversations across the websites.


Note: Note: Navigate to Admin Settings > CRM Tracking Code > Integrate your website > Copy to get the widget code


<script>
var restoreId = RESTOREID //Which need to be fetched from your DB
window.fcWidgetMessengerConfig = {
externalId: "john.doe1987", // user's id unique to your system
restoreId: restoreId ? restoreId : null
}
window.fcWidget.user.get(function(resp) {
var status = resp && resp.status,
data = resp && resp.data;
if (status !== 200) {
window.fcWidget.user.setProperties({
firstName: "John", // user's first name
lastName: "Doe", // user's last name
email: "john.doe@gmail.com", // user's email address
phone: "8668323090", // phone number without country code
phoneCountryCode: "+1", // phone's country code
plan: "Estate", // user's meta property 1
status: "Active", // user's meta property 2
"Last Payment": "12th August" // user's meta property 3
});
window.fcWidget.on('user:created', function(resp) {
var status = resp && resp.status,
data = resp && resp.data;
if (status === 200) {
if (data.restoreId) {
// Update restoreId in your database
}
}
});
}
});
</script>
<script src='//fw-cdn.com/1*****7/2*****4.js' chat='true'></script>

Install Freshchat on your WordPress site

You can install Freshchat on your WordPress site with a few easy steps and start interacting with customers and visitors.


1. Login to your WordPress account. Go to Plugins > Add New.


2. Search for Freshchat plugin > Install > Activate.



Now you can find the Freshchat plugin in your side panel. 


3. Click on Freshchat and select Enabled from the drop-down. 



You can get the code from your account by going to Admin > Admin Settings > Native Integrations for Chat > WordPress.


4. Paste this code in WordPress and save changes. 



Install Freshchat on Squarespace


You can install Freshchat on your Squarespace site and start communicating with your visitors and visitors.


Log in to your Squarespace account. Go to Admin > Advanced > Code Injection. 


Paste the below code snippet in the Header section.

<script>
var restoreId = RESTOREID //Which need to be fetched from your DB
window.fcWidgetMessengerConfig = {
externalId: "john.doe1987", // user's id unique to your system
restoreId: restoreId ? restoreId : null
}
window.fcWidget.user.get(function(resp) {
var status = resp && resp.status,
data = resp && resp.data;
if (status !== 200) {
window.fcWidget.user.setProperties({
firstName: "John", // user's first name
lastName: "Doe", // user's last name
email: "john.doe@gmail.com", // user's email address
phone: "8668323090", // phone number without country code
phoneCountryCode: "+1", // phone's country code
plan: "Estate", // user's meta property 1
status: "Active", // user's meta property 2
"Last Payment": "12th August" // user's meta property 3
});
window.fcWidget.on('user:created', function(resp) {
var status = resp && resp.status,
data = resp && resp.data;
if (status === 200) {
if (data.restoreId) {
// Update restoreId in your database
}
}
});
}
});
</script>
<script src='//fw-cdn.com/1*****7/2*****4.js' chat='true'></script>


Install Freshchat on your mobile (iOS or Android)


You can support your customers on the go with the Freshchat app for iOS and Android. Your agents can continue conversations with customers even when they are away from their desks.


With the Freshchat mobile app, your agents can do almost everything they can do in the Freshchat web app.

  • Continue conversations: View, reply to, assign, and manage conversations from anywhere, anytime.

  • Know who you’re talking to: Get access to the visitor profile with details like contact information, events timeline, and usage history to have contextual conversations.

  • Never miss a message - With Push Notifications, get notified when a user replies or reaches out to you. Stay on top of messages even when you’re not inside the app.


You can also install Freshchat within your mobile app or engage with customers through popular messaging apps like WhatsApp and iMessage(Apple Business Chat).