Gigya Job Openings

Using Gigya Plugins in Drupal

Skip to end of metadata
Go to start of metadata

Overview

This document will show you how to configure the Gigya plugins and insert them into your site.

Plugin Configuration

The plugins can be configured through the Admin Configuration Panel under the Gigya entry (Configuration > Web Services > Gigya Settings).

Select the tab for the plugin you want to configure.

Share Plugin

The Gigya Share plugin allows users to share stories to social networks.

Click to enlarge screenshot

You can easily integrate the Gigya Share Bar in your Drupal site by defining a container for it in the Gigya > Share Settings page. Read more in the Adding Gigya plugins section.

You can select the share providers you would like to have by writing them in the Share Providers field, separated by a comma.

FieldDefault Description
Container IDgigya-shareThe ID of the HTML DOM element that will contain the share bar.
Share Buttonsshare,facebook-like,google-plusone,twitter,emailType a comma-separated list of share buttons to display. For the full list of available providers, refer to the socialize.showShareBarUI API page.
Share Bar LayoutHorizontalHorizontal or Vertical.
Show countsRightSpecify if and where (right or top) to display the number of times a share button was clicked for this product.
Scope for publishing
to activity feed
Both

Deprecated

The license could not be verified: License Certificate has expired!

Default share title[node:title]Default title to display for the share item post.
Default share description[node:summary]Default description for the share item post.
Default linkback URL[node:url:absolute]Default linkback to which the users will be directed when clicking the share post.
Imageuse image tag if existsInstructions on where to retrieve the image for the post item.
Options are:
  • First image on the post.
  • Specify an image URL.
  • Use image tag if exists, first image on post otherwise - If an image URL was specified, use it. Otherwise, use the first image that appears in the post.
Share using short URLsnoCheck this box in order to user short URL.
Token List Quickly insert tokens into one of the settings fields by clicking a field followed by clicking the desired token.
Advanced settings(no default)This box enables you to specify configuration options beyond those available in the fields above. For details, refer to the Advanced Settings section. For the list of available configuration options, refer to parameters table in the socialize.showShareBarUI API page.

Comments Plugin/Rating & Reviews

The Gigya Comments plugin enables site users to post comments and have discussions about published content on the site.

The Gigya Rating & Reviews plugin gives your customers an easy way to provide feedback on product and content across your site.

The Ratings & Reviews plugin is an extension of the comments plugin, and can be set in the Gigya admin console when creating a new comments category .

The plugin also requires setting up in the Gigya admin console by following the steps described in the Comments plugin page.

Comments is a premium package that requires separate activation. If it is not part of your site package please contact your Gigya Customer Engagement Executive or contact us by filling in a support form on our site. You can also access the support page by clicking Support on the upper menu of Gigya's site.

Both the Gigya Comments and Rating & Reviews plugins supports SEO, meaning the comments/reviews content is searchable by the main search engines.

Comments:

Click to enlarge screenshot

Ratings & Reviews:

Click to enlarge screenshot

To use this plugin, define a Category ID in Gigya's Admin Console and enter it below, then set Enable Gigya Comments to Yes. The rest of the settings are optional.

FieldDefault Description
Enable Gigya CommentsNoSelect Yes to enable the Comments plugin or No to disable it.
Gigya comments Category ID Enter the name of a comment category that you have set up in the Gigya console. To define a comment category go to the Gigya Management Console, Settings > Comments > Comments Setup . To learn more refer to the Setup a New Comment Category on Gigya's website.
Container IDcommentsThe container ID that the comments will be displayed in.
Scope for publishing
to activity feed
Both

Deprecated

The license could not be verified: License Certificate has expired!

Do not load Drupal commentsyesIf checked Drupal comments will not load, only Gigya comments will be loaded. Note: this may harm the site's SEO as comments will not be indexed by search engines
Advanced settings(no default)This box enables you to specify configuration options beyond those available in the fields above. For details, refer to the Advanced Settings section. For the list of available configuration options, refer to parameters table in the comments.showCommentsUI API page.
The Drupal module implementation sets the streamID parameter internally to the node ID value. This way, each instance of the Comments Plugin has its own unique streamID value, corresponding to the ID of the post where the comments appear. You may override this setting using the advanced settings or using hooks.

Reactions Plugin

The Gigya Reactions plugin enables users to share defined reactions to site products on user social networks.This plugin displays a set of buttons like the following in a webpage:

Click to enlarge screenshot

Reaction buttons are defined by a comma separated list of JSON objects. Each object defines a single Reaction button to be displayed in the reactions bar. refer to the Reaction object for the specification of the object structure.You may also use Gigya's Reactions wizard. Make sure you are logged-in to Gigya's website, you may access the wizard by clicking the Plugins tab, and then the Reactions on the side bar.

To define the reactions buttons, or to paste the buttons code produced using the Reactions wizard, follow the instructions under the Placing a Plugin Content Field section in the Adding Gigya plugins section. If you copy Reactions from the Reactions wizard, make sure that you paste only the Reactions buttons' objects and not the entire code.

FieldDefaultDescription
Container IDgigya-reactionsThe container ID that the comments will be displayed in.
Bar IDreactions-barID of the reaction bar.
Reaction title[node:title]Default title to display for the share item post.
Default linkback URL[node:title]Default linkback to which the users will be directed when clicking the share post.
LayoutHorizontalHorizontal or Vertical. The direction in which the buttons are arranged.
Use multiple reactionsYesSelect Yes to allow a single user to activate multiple reactions, when set to No only one reaction bar is allowed per user.
Count typeNumberNumber or Percentage. The reaction button count is shows as a literal number or as a percentage of the total buttons pressed.
Scope for publishing to activity feedBoth

Deprecated

The license could not be verified: License Certificate has expired!

Imageuse image tag if existsInstructions on where to retrieve the image for the post item.
Options are:
  • First image on the post.
  • Specify an image URL.
  • Use image tag if exists, first image on post otherwise - If an image URL was specified, use it. Otherwise, use the first image that appears in the post.
Advanced settings(no default)This box enables you to specify configuration options beyond those available in the fields above. For details, refer to the Advanced Settings section. For the list of available configuration options, refer to parameters table in the socialize.showReactionsBarUI API page.
Token List Quickly insert tokens into one of the settings fields by clicking a field followed by clicking the desired token.

Reactions Code Sample

The following sample code displays these Reaction buttons:

{
    text: 'Amazing',
    ID: 'amazing',
    iconImgUp:'http://cdn.gigya.com/gs/i/reactions/icons/Amazing_Icon_Up.png',
    iconImgOver:'http://cdn.gigya.com/gs/i/reactions/icons/Amazing_Icon_Down.png',
    tooltip:'This item is amazing',
    feedMessage: 'This is amazing!',
    headerText:'Your reaction to this post is \'Amazing\''
},
{
    text: 'Geeky',
    ID: 'geeky',
    iconImgUp:'http://cdn.gigya.com/gs/i/reactions/icons/Geeky_Icon_Up.png',
    iconImgOver:'http://cdn.gigya.com/gs/i/reactions/icons/Geeky_Icon_Down.png',
    tooltip:'This item is geeky',
    feedMessage: 'This is geeky!',
    headerText:'Your reaction to this post is \'Geeky\''
}

Gamification (Loyalty) Plugins

Gigya Loyalty - Gamification and User Behavior is a social loyalty and rewards platform that you can embed in your website, increasing site engagement and making your users' experience more enjoyable. To use this plugin check the Enable Gigya Gamification checkbox. The rest of the Gamification settings are optional.The Gamification plugin also requires setting up in the Gigya admin console by following the steps described in the Gamification plugin page.

Gamification is a premium package that requires separate activation. If it is not part of your site package please contact your Gigya Customer Engagement Executive or contact us by filling in a support form on our site. You can also access the support page by clicking Support on the upper menu of Gigya's site.

Click to enlarge screenshot

 

FieldDefault Description
Enable Gigya GamificationYesCheck this box to enable the Gamification plugin or No to disable it.
Enable Gamification NotificationsYesCheck this box to enable popups notifying the user of Gamification achievements: See Notifications for more details.
Leaderboard time periodAllDisplays for the top users for the challenge within the set period: See Leaderboard for more details.
Leaderboard user count12Select a number between 1 - 23 to set the number of users displayed in the leaderboard.
Advanced Settings(no default)This section enables you to specify configuration options beyond those available in the fields above. For details, refer to the Advanced Settings section. Each box sets the advanced settings for the corresponding plugin.
For the list of available configuration options, refer to parameters table in the appropriate method's API page:

Gigya Gamification Blocks

The Gamification blocks section in the Gamification settings tab is a quick way to configure and deploy some of Gigya's game mechanics plugins, such as User Status and Leaderboard.

These plugins display GM stasts and update live as the user performs actions that affect the state of the plugin. To learn more go to the Game Mechanics plugins section. When adding multiple instances of a plugin, you will need to define a block to contain each instance of the plugin and will be placed in your web page. For example, you might want to place one User Status plugin in your website's header, and one in the footer. To achieve this you will need to create two blocks, each containing an instance of the User Status plugin, and place one in the header and one in the footer.

In order to create a block, follow the following steps:

  • Under the Gamification tab, go to the Create a new block box.
  • Enter a name for your new box. It is recommended to use a name relevant to the purpose of the box, so for the first box of two that will contain a User Status plugin, a name like User_Status_1 will be appropriate.
  • Check the box next to the plugin you wish to create (in our example: User Status).
  • Click Create a block .
  • Click Save configuration to save the changes you made (at the bottom of the page).

In order to place the plugin on your site, go to Configuration > Structure > Blocks. Find the Newly created block, and in the Region column select the section of the site where you want to place the plugin.To remove a block simply check the box next to it in the Delete blocks section and click Delete.

Defining Actions

Gamification challenges are propelled by actions. Using GM to define challenges, users can then perform actions to earn points for their engagement.
The Gigya module allows you to synchronize activities on your Drupal site with predefined actions, defined in the challenges section of the console.To integrate actions into your site, you will need to download, install and enable the rules module.

  • Once you have the rules module set up, go toConfiguration > Workflow > Rules.
  • Name your action by filling out the required Name text box, and select an event to react on from the React on event drop-down list.
  • If you wish to limit the action to specific pages, select a page type from the Restrict by type drop-down. Otherwise, the action will be called every time the reaction event occurs. For instance, if you select the Content is viewed event, and not restrict by type, the event will trigger every time a page is loaded. However, if you select to restrict by type to pages of type Article alone, the event is triggered only in case an article page is loaded.
  • ClickSave to continue.
  • Under the Actions section, click Add Action.
  • From the Select action to add drop-down, select Gigya game mechanics action.
  • The following drop-down will contain the actions defined in the Gigya console. Select the action you want to associate to the event you have created.
  • Click Save to complete the process, and repeat until all the actions you wish to trigger on your site are associated with a rule in Drupal.

 

Follow Bar Plugin

Gigya has deprecated the Follow Bar add-on. If you are using the Follow Bar in any of your Drupal sites, please remove it.

To remove the Follow Bar:

  1. In the Drupal admin console, go to Structure > Content Types.
  2. Select the content type to which you added the Follow Bar, e.g. Article.
  3. Select the Manage Fields tab.
  4. In the field list, find the Gigya Follow Bar widget and select Delete.


Adding Plugins to Your Pages

This section explains how to add Gigya's social plugins to your website. Note that some of the plugins require setting up on the Gigya admin console: see the plugin settings section for details.

After configuring the plugin, you can insert it into your page(s) in several ways (click the links for more information):

  1. Adding a plugin as a block
  2. Adding a plugin as a content field
  3. Adding a plugin in a panel

To pick the best method, look for the note at the top of the plugin configuration page, for example:

Click to enlarge screenshot

 

Note that some plugins require activation before they can be used. In the plugin settings page, look for the Enable checkbox at the top of the tab, and make sure it is checked.

Adding a Plugin as a Block

In order to add a Gigya plugin as a block to your website:

  • Go to Structure > Blocks.
  • Find the block you wish to add in the list. If the plugin hasn't been added to the site yet, it will probably be under the Disabled section.
  • Open the drop down menu and select the area in which you wish to position the plugin.
  • ClickSave blocks at the bottom of the page.
    Click to enlarge screenshot

Adding a Plugin as a Content Field

In order to add a Gigya plugin as a field in your content type:

  • Go to Structure > Content Types
  • Find the content type you wish to add the plugin to and click Manage Fields
    For example: the following screenshots shows a website with two content types - Article and Basic page.
    Click to enlarge screenshot
  • From the Add new field row, enter a name for the plugin instance you wish to add.
  • Choose the plugin type from the drop-down menu under Field type.
    For example: in the following screenshot shows how to select the Ratings & Reviews plugin to add to the selected content type.
    Click to enlarge screenshot

Next, you will need to fine tune the plugin to match display settings of the plugin in the admin console

  • Click the Manage Display tab on the top right of the page.
  • On the row of your newly added plugin, click the configuration button on the right.
  • The row will de-collapse, presenting configuration fields for that specific plugin. For example, for a Ratings & Reviews plugin, you will need to specify the Category ID as defined in the Gigya admin console, and the Comments container ID as defined in the Comments & Reviews tab in the Drupal configuration section.
  • This is also the place where you should define the content of the plugin when necessary. i.e - defining reaction buttons, or sharing providers for the Share bar plugin.
  • When checking the Override default settings checkbox (see above image), the settings defined in the configuration menu will override the corresponding settings defined in the Gigya module Admin Configuration and will only effect the instance of the plugin that you are creating. This is useful when trying to create a unique instance of a plugin that serves a different functionality.
  • Click Update to submit the changes to the plugin.
  • Click Save to update the page with your changes.

That's it. A new Gigya social plugin will appear on your site in the position you defined.

Adding a Plugin in a Panel

Gigya's plugins can also be added to panels, if you have the panels module installed and enabled.

  1. The Gigya module also has a Panels integration that you should also enable from the Gigya section of the Modules page.
  2. When adding a new panel, make sure to add context to the panel, as some of Gigya's plugins require context and will not be available for embedding on the panel otherwise. Add context by checking the Contexts checkbox under the Optional features section in the first page of the Add panel flow.
  3. Next you will be prompted to select the context for your panel from the available contexts drop down menu.
  4. Select the context you would like and click Add context. Based on the context you selected, you will be required to enter an identifier to an instance of that context. For example, if you selected the node context, you will need to enter an ID on an existing node entity on your site.
  5. That's it as far as Gigya requirements. When finished with the panel creation flow and you want to add a Gigya plugin to your panel, simply click Add content from the settings menu:
  6. In the pop-up window, select Gigya from the left hand side menu:
  7. Select the plugin you wish to add from the list of plugins available (if you are missing some plugins, make sure that you have defined context to your panel) and click Finish.

Adding Multiple Plugins To a Panel

When adding more than one plugin of the same type to panel (i.e two follow bars), you need to define different IDs for the plugin containers, as the default ID cannot be assigned to more than one container.
This is done by checking the Override default settings checkbox on the widow that follows selecting the plugin.

Once you check the box, further configuration options will be available to you. Change the name of the container ID (e.g gigya-follow-bar2) to enable two instances of the plugin to appear on the page.

 

 

 

Save

Save

Save

  • No labels