---
schema_version: "1"
id: 2ca36e212c05ebdfd68b48136e8be7e74cf694b99cf32bf7a0380b98bcd840e9
title: Add Your Embedded Chat to a Website
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/service/264-0-0/snapins_chat_get_code.md
canonical_url: https://help.salesforce.com/s/articleView?id=service.snapins_chat_get_code.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: 191b801b6d6c5a71178348a424ec214c31636f54380d29e1808e4909c14e40a0
description: Salesforce generates a unique Embedded Service code snippet from the information you provide during setup. Copy and paste the code snippet to include chat on your web pages. Add the optional meta tag code snippet to improve performance for both mobile and desktop.
products:
  - Service Cloud
release: "264"
---
# Add Your Embedded Chat to a Website

Salesforce generates a unique Embedded Service code snippet from the information you provide during setup. Copy and paste the code snippet to include chat on your web pages. Add the optional meta tag code snippet to improve performance for both mobile and desktop.

### Required Editions

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small edition"><colgroup><col></colgroup><tbody><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;"><a href="https://help.salesforce.com/s/articleView?id=service.legacy_editions.htm&amp;language=en_US" target="_blank">View supported editions</a>.</td></tr></tbody></table>

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small permission">
        <colgroup>
          <col style="width:50%">
          <col style="width:50%">
        </colgroup>
        <thead class="slds-text-title_caps ">
          <tr class="">
            <th scope="colgroup" class="slds-cell-wrap" colspan="2" style="text-align:center;vertical-align:top;" id="d12686e58">User Permissions
              Needed</th>
          </tr>
        </thead>
        <tbody>
          <tr class="">
            <td data-label="User Permissions Needed" class="slds-cell-wrap" style="vertical-align:top;" headers="d12686e58 ">To set up Embedded Chat:</td>

            <td class="slds-cell-wrap" style="vertical-align:top;" headers="d12686e58 ">Customize Application AND Modify Metadata</td>

          </tr>
        </tbody>
      </table>

![Important](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-service-support_legacy-264-0-0-production-enus/081af4ec-6c06-4d4b-9443-cb3516bbc46d/images/icon_important.png)

Important

Legacy Chat will be retired on February 14, 2026. To avoid service interruptions to your end users, switch to enhanced Chat (formerly Messaging for In-App and Web). Enhanced Chat offers many of the legacy Chat [features that you love](https://help.salesforce.com/s/articleView?id=service.miaw_replacing_chat_considerations.htm&language=en_US) plus asynchronous conversations that can be picked back up at any time. Learn about migrating in [Help](https://help.salesforce.com/s/articleView?id=service.miaw_replacing_chat_considerations.htm&type=5&language=en_US) and [Trailhead](https://trailhead.salesforce.com/content/learn/modules/migrating-from-legacy-chat-to-enhanced-chat).

Before you start, make sure you have access to the company’s web pages. After adding the code snippet, customers can see and use the chat window. If you’re not ready for them to access chat, include the code snippet on a private web page first. Avoid modifying the code snippet, which impacts how chat is loaded and whether conversations continue as users navigate from page to page.

Here are the steps to add your code snippet:

1. From Setup, enter Embedded Service in the Quick Find box, then select **Embedded Service**.
2. Select the Embedded Service deployment that you want to work with by clicking the arrow beside the deployment name and selecting **View**.
3. In the Embedded Service configuration page, go to the Embedded Service code snippets section and click **Get Code**.
4. Copy the chat code snippet and paste it immediately above the closing `</body>` tag on your web page, adding Embedded Chat to the page.
    
    Paste the chat code snippet into every web page where you want the chat window to appear. Don’t place your code snippet in a header or on the same web page as a Chat button. Optionally, customize the chat code snippet.
5. Optionally, copy and paste the meta code snippet into the `<meta>` tag head section in every web page where you want the chat window to appear.
6. Click **Done**.
    
    The code snippets page closes.

The `<meta>` tag code makes your web page responsive, so the chat window look good and performs well on different devices. For example, if a customer views your web page and chat window on a mobile phone, both are resized.

![Important](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-service-support_legacy-264-0-0-production-enus/081af4ec-6c06-4d4b-9443-cb3516bbc46d/images/icon_important.png)

Important

If there are issues with behavior on other devices, update your `<meta>` tag to the code snippet that’s provided. This tag is added to the head section of every page where the chat window is used. If you don’t include an appropriate `<meta>` tag, the chat window appears as it does on a desktop, regardless of the user’s device used to access the page.

If you’re adding your Chat window to a Visualforce page, include these attributes on your `apex:page` tag to keep styling consistent with your web pages:

`<apex:page showheader="false" sidebar="false" standardStylesheets="false">`

- **[Customize the Embedded Service Code Snippet](https://help.salesforce.com/s/articleView?id=service.snapins_chat_customize_code.htm&release=264.0.0&type=5)**  
    Use a text or HTML editor to customize the optional parameters in the Embedded Service code snippet.
- **[Add Your Website to the CORS Allowlist](https://help.salesforce.com/s/articleView?id=service.embedded_chat_cors_allowlist.htm&release=264.0.0&type=5)**  
    Add the URLs of the web pages where you intend to add the chat window to the CORS allowlist in your org. The web page where you add the chat window is the page that customers use to access chat.

#### See Also

- [Customize the Embedded Service Code Snippet](https://help.salesforce.com/s/articleView?id=service.snapins_chat_customize_code.htm&release=264.0.0&type=5 "Use a text or HTML editor to customize the optional parameters in the Embedded Service code snippet.")
- [Customizable Parameters in the Embedded Chat Code](https://help.salesforce.com/s/articleView?id=service.snapins_chat_parameters.htm&release=264.0.0&type=5 "You can customize certain parameters that affect the appearance and behavior of the chat window so that the chat experience reflects your company’s branding. Use these parameters to customize the pre-chat background image, logo, waiting-state image, and your agent’s avatar picture. You also can customize the wording that appears on the chat button and on the chat window when the chat is loading, when agents are online, when agents are offline.")
- [Test Your Embedded Chat Window](https://help.salesforce.com/s/articleView?id=service.snapins_chat_test.htm&release=264.0.0&type=5 "After adding Embedded Chat to your web pages or Experience Builder site, check the customer’s experience.")