Comments Widget
  • 18 Sep 2023
  • 3 Minutes to read
  • Contributors
  • Dark
    Light
  • PDF

Comments Widget

  • Dark
    Light
  • PDF

Article Summary

In Simulator.Company, you can view user comments and reactions from a web page using Comments Widgets. Connecting a Comments Widget to your page allows directing comments and reactions from the page to an automatically created event in Simulator.Company.
By means of Comments Widgets Simulator.Company allows you to navigate through and helps manage comments and reactions placed on particular pages (any number of pages) of your blog, online shop, or any other online resource.

To get comments on your page under your control, do the following:

  1. Create a Comments Widget actor in the Communications or Actors Bag subsection;
  2. Copy the provided Comments Widget embed code;
  3. Insert the copied embed code into an HTML code of the page you want to manage comments and reactions from;
  4. View comments and reactions from the page in the automatically created event.

Сreating a Comments Widget

To create a Comments Widget do the following:

  1. Open the Actors bag subsection of the Simulator.Company workspace menu;
  2. Open the System Forms tab;
  3. Select the Comments Widget item in the list;
  4. Click the Create or New actor (available in an empty Actors bag subsection) button;
  5. Set the configuration for your new Comments Widget (select the status, enable and fill out the optional field, etc.);
  6. Click Save to save a new Comments Widget:

comments widget creation-actor bag.gif

Alternatively, you can create a Comments Widget from the Communications subsection, Comments Widgets tab of the workspace menu:

communications-comments widget high.png

The newly created Comments Widget will be displayed in the Communications section and the Actors bag, System forms tab, and Comments Widgets subsection.

Copying a Comments Widget Embed Code

To copy the embed code of a Comments Widget, follow these steps:

  1. Open the Comments Widgets tab in the Communications section to access the Comments Widget list:

image.png

  1. Click on the desired Comments Widget to open its details;
  2. Within the Details menu, navigate to the Embed code tab:

image.png

  1. Click the Copy embed code button to copy the code:

image.png

The copied Embed code will have the following view:

<script>
    window.ctrlSettings = {webComments: {actorId: "Actor ID", elementId: "{{element_id}}"}
    };
  </script>
  <script>
    (function () {
      window.ctrl = window.ctrl || function () {
        (window.ctrl.q = window.ctrl.q || []).push(arguments);
      };
      var script = document.createElement("script");
      var parent = document.getElementsByTagName("script")[0].parentNode;
      script.async = 1;
      script.src = "https://widget.control.events/shim.js";
      parent.appendChild(script);
    })();
  </script>

Inserting the Embed Code Into the HTML Code of Your Page

To use a Comments widget on your page, insert the Embed code that you've copied from the Comments Widget actor and insert it into the HTML code of the page you want to place your Comments widget on.

Viewing Comments and Reactions on Your Page in a Simulator Event

Once you've inserted an Embed code into your page, the Comments Widget will become active on your page, enabling it to receive and store comments.

From here, you can observe the comments and reactions on your page through an event that is automatically generated and linked to your Comments Widget:

comments widget-8 new event.png

To view comments, reactions, and other details on your page within the event, simply open the event that has been created:

comments widget-9 new event details.png

In the Details tab of the event, you can access detailed information about the Comments Widget and the page it is being used on. Within the Info section (1), you can find details such as the Comments Widget's actor ID, reference, creation and modification date, and the widget's owner.

The Meta info section (2) provides details about the IP address, operating system, and browser that were used to create the page, along with the page's address and the browser's system language.

In the Linked actors section (3), you can find a link to the Comments Widget that is associated with your page.

Lastly, the comments and reactions section (4) displays the comments and reactions that have been collected from your page.

Moderating comments and reactions

To moderate and manage comments and reactions on your page, utilize the administrative tools provided on the page

(Optional) Insert the Web Widget actor's ID into the Embed code on your page

You can also use an Embed code to implement a Web widget on your web page. Similar to a Comments widget you can create a Web widget in the Actors bag->System forms->Widgets. Then use the Embed code provided in section 2 to activate the created Web widget:

  • insert the Embed code into the HTML code on your page;
  • copy the Web widget actor ID (Actors bag->System forms->Widgets);
  • find the following segment in the inserted Embed code:
window.ctrlSettings = {
      webWidget: {
        actorId: ''
      },
  • insert the Web widget actor ID into the actorId line between the braces.

After this, the Web widget activates on your page and provides chat communication.

Using a Comments Widget and a Web Widget on the same page

You can have both Comments widget and a Web widget on the same page or use either one.


Was this article helpful?

What's Next