Quick Start - Setup and Integration
This guide will help you quickly integrate Gigya's Comments Add-on into your site, with their default settings.
Comments Within A Site-Group
In a site-group, comments work as they do otherwise. Comments are not shareable between multiple API keys, so each child site that uses comments must have their own comments configuration.
The integration process includes two broad stages:
- Setting up a New Comment Category on Gigya's website
Note: This step is necessary only when integrating the initial instance of the Comments Add-on on your site. When integrating more instances, you can reuse the same settings and jump to Stage 2.
- Copying the generated code from Gigya's website and integrating the code into your site
Setting up a New Comment Category
Every Comments Add-on instance belongs to a Comments Category. The Comments Category provides the option to define a group of Comments Add-on instances that share the same settings. You may define one or more Comments Categories for your domain. Each category may be configured to have different settings. The settings are defined on the server side and may be administrated using the Comments Setup section of Gigya's website.
Follow the steps below to create a new Comments category:
- Go to the Comments Setup section of Gigya's website. Please make sure your are signed in. The Comments Setup page may also be accessed by clicking Settings in the upper menu and then Comments in the left menu.
- Click the Add new comment category button:
- Fill in a new Category Name and select the Comments radio button:
- Click OK. A new Comments Category instance is created. Notice the newly created row in the Comments categories table:
The Comments Settings button leads to an administration screen that lets you change the default settings of the Comments category. This subject is broadly explained in the Configuration and Administration section below.
Integrating the Add-on Code into Your Site
The simplest and fasted way to integrate the Comments Add-on in your site is to copy the "Embed code" from the category row and paste it into the spot in the part of your web page in which you want the Add-on to appear.
The best practice, though, is to cut the first line of code and move it to the section of your page. This line loads Gigya's Web SDK.
The outcome is:
The above code is of a basic web page that includes only the Comments Add-on. See this code in action in the Running Example below.
Notice the categoryID in line 12. This ID was generated by Gigya and is a unique identifier for the Comments category that you have defined in the previous step.
Notice the streamID in line 13. The streamID identifies a stream of comments within a Comments category. The ID is now empty, meaning that we have a single stream with an empty identifier. Two Comments Add-on instances that share the same categoryID and streamID will show the same comments.
To create several instances of Comments Add-ons that belong to the same category, copy the same code to different spots in your site where you wish to insert the Add-on. In each spot, assign a different identifier (string) to the streamID. We suggest using the permalink as the streamID. Note: streamID is limited to 150 characters and is case-sensitive.