FastComments.com

Add Live Commenting to Google Sites

This guide adds the FastComments live commenting widget to pages of a site built with Google Sites.

Google Sites does not provide a comment feature for site visitors. Content from other services is added with Insert > Embed, which accepts either a URL or HTML and JavaScript code. This guide covers both: Method 1 places the FastComments widget code in an embed code block, and Method 2 embeds a conversation page hosted by FastComments by its URL.

This tutorial requires a FastComments account. You can create an account here.

Step 1: Add an Embed Code Block Internal Link

  1. On a computer, open the site in Google Sites and go to the page that should have comments.
  2. In the panel on the right, click Insert > Embed.
  3. Click Embed code.

Step 2: Add the FastComments Code Internal Link

Paste the following code into the embed code box, then click Next and Insert.

Google Sites FastComments Code
Copy CopyRun External Link
1
2<script async src="https://cdn.fastcomments.com/js/embed-v2-async.min.js"></script>
3<div id="fastcomments-widget"></div>
4<script>
5window.fcConfigs = [{
6 "tenantId": "demo",
7 "url": "https://sites.google.com/view/your-site/about",
8 "urlId": "about-page"
9}];
10</script>
11

Change the two highlighted values for each page:

  • urlId identifies the comment thread. Use a different value on each page, for example 'about-page' or 'contact-page'. Pages that use the same urlId show the same thread.
  • url is the published address of the page. It is used for links to the page, for example in notification emails.

Google Sites runs embed code in a separate frame served from a Google domain, not on the page address of your site. Without urlId, the widget uses the address of that frame, which changes between page loads, so the thread would not be found again. Set urlId in every embed.

Step 3: Resize and Publish Internal Link

The height of the embed is set in the Sites editor. Resize the embed so it is tall enough for the comment thread. With the embed selected, the keyboard shortcut Alt + Right or Left arrow also resizes it.

To publish the change, click Publish at the top right.

Open the published page to confirm that the comment widget loads.