Gigya Job Openings

Sitecore

Skip to end of metadata
Go to start of metadata

 

Overview

Gigya's connector for Sitecore integrates Gigya's Registration-as-a-Service with your Sitecore-based site. The Gigya connector provides full cloud-based user management, allowing users to register to your site using social network identities such as Facebook, Twitter, LinkedIn, Google and more. We offer a range of plugins integrating your site with the social networks through registration, login, sharing, comments, ratings, reviews and reactions. Plugins are extensible and customizable and can be added in Sitecore's page edit mode. Gigya's integration with Sitecore supports Sitecore Experience Database (xDB).

Integration Functionality

Gigya Registration-as-a-Service

Registration-as-a-Service (RaaS) is a powerful CIAM platform (Customer Identity and Access Management) that enables you to connect with your website and app users, and engage with your customers. RaaS helps you gather critical information about your users, store that information securely and leverage it for an enhanced customer experience.  

User Profile Integration

When using this Connector, users log in or register to your Sitecore website through Gigya RaaS screens. Users are stored in Gigya's database, and are synced into Sitecore. Note that when you delete users from the Sitecore database, they are deleted from Gigya as well. 

Content Personalization

Use any Gigya data fields that are mirrored into Sitecore to personalize content. For more information, see below. 

Multi-site and SSO Support

The Gigya connector supports multi-site configuration and single-sign-on (SSO). For more information about Gigya's multi-site support, see Site Groups and Single Sign-On

Gigya recommends using dynamic sessions whenever inside an SSO group. For additional information, see Managing Session Expiration.

To enable single-logout for a site group, see GConnector Single Logout In SSO Groups.

Localization

The connector automatically grabs the language definition from the Sitecore site (context language) and passes it to Gigya via gigya.js load.

Version and Compatibility

Gigya GConnector supports the following Sitecore versions:

  • 9.0

For Sitecore versions < 9.0 see Sitecore Legacy.

 

Installation

Download the module package from: 

Gigya Developer Downloads

Login to the Sitecore backend by going to /sitecore. On the dashboard, click the Desktop icon. Click the Sitecore  start icon then Development Tools then Installation Wizard. Click Upload package and select the zip file that you downloaded above.

If you are using Sitecore 9, be sure to follow the Sitecore 9 additional steps below.

Prerequisites

To install the connector, you will need: 

Login to the Sitecore backend by going to /sitecore. On the dashboard, click the Desktop icon. Click the Sitecore  start icon then Development Tools then Installation Wizard. Click Upload package and select the zip file that you downloaded above.

If you are using Sitecore 9, be sure to follow the Sitecore 9 additional steps below.

Settings

Once the module is installed you can configure your settings at a global level or at a site level in a multi-site environment. The best way to start is by configuring the global settings. This means that if a particular site doesn’t have any settings associated, the global settings will be used. Global settings are located at /sitecore/system/Modules/Gigya/Global Settings.

Global settings:

 

Site specific settings must be created as a direct child of the site’s start path (homepage) and called Gigya Settings using the Gigya Settings template. It’s possible to change the name of the item to something other than Gigya Settings by adding a gigyaSettings attribute to your site definition and providing a path to the item e.g.,:

<site patch:before="*[@name='website']" name="website2" hostName="gigya2.local" gigyaSettings="/path/to/gigya/settings"……

 

Site specific settings:

 

If using site specific settings, you can configure a parent settings item which means you don’t need to configure membership and xDB mapping fields per site. You just need to configure the Settings Parent field:

 

The following fields are available on the Gigya Settings template:

Field NameDescription
API KeyThe Gigya API key
Application KeyThe Gigya Application key
Application SecretThe Gigya Application Secret which is encrypted and only available to Sitecore Administrators or users with the Gigya Major Admin role.
LanguageThe Gigya language that will be used.   If Auto is selected, the page’s current language will be used.
Debug ModeIf selected, additional logs will be written to the standard log file.
Data CenterThe Gigya data center associated with the API key.
Global ParametersAny extra/permanent Gigya global Conf parameters that are required on the page in JSON format.
Enable RaaSMust be checked in order to enable the module.
Enable xDB SyncIf checked, Gigya data will be synced into xDB according to the xDB mapping fields.
Enable Membership Provider SyncIf checked, Gigya data will be synced into Sitecore’s membership system (User Manager) according to the xDB mapping fields.
Redirect URLThe URL that the user will be redirected to when they login. If left blank, the current page will be reloaded.
Logout URLThe URL that the user will be redirected to when they logout. If left blank, the current page will be reloaded.
ProfileThe Sitecore profile to use when updating users in the membership system. If unspecified the default Sitecore user profile will be used.
Settings ParentIf specifying settings for a site you can specify another site’s settings or the global settings in order to use the linked settings membership and xDB mapping settings.
Gigya Session TypeThe Gigya session type which is determined from the slidingExpiration attribute of the <forms> element in the web.config.   If true, then Gigya’s sliding session mode will be used, otherwise it’s fixed.
Gigya Session DurationThe Gigya session duration which is determined from the timeout attribute of the <forms> element in the web.config.   The same duration should be use across multiple sites in an SSO environment.
Session Cookie ModeConfigures whether to use session or persistent authentication cookies.   If using SSO, the recommended setting is unchecked.
Enable SSO Token

If checked, gigya.accounts.setSSOToken() will be called on login which causes the user to be redirected to a Gigya page to set the auth cookie.

See accounts.setSSOToken JS for more details.

Sync SSO Group

If checked, a call to gigya.syncGroupGltExp() will be made on each page load.   

See syncGroupGltExp JS for more details.

 

Like most Sitecore items there are standard values associated with the Gigya Settings items which can be modified if required. This will make it easier when creating now settings items.
Beneath the Gigya Settings template are 2 folders. One for Membership mapping fields and one for xDB mapping fields.

Membership Mapping

Gigya Mapping Field items can be created beneath the Membership folder. These items have a field for Gigya property and a Sitecore property. An autocomplete field is provided for the Gigya properties.

The autocomplete results are cached for 10 mins.

 

The Sitecore Property dropdown allows you to specify a profile property. To add a new property first make a note of which profile is selected on the parent Gigya Settings item. If nothing is selected then the default User profile is used. Once you know the profile, switch to the core database and find the profile beneath /sitecore/templates/System/Security. Here you can add new fields to the profile template.

See https://briancaos.wordpress.com/2014/06/12/sitecore-users-custom-profile-properties/ for how to create a new user profile which must be assigned on the Gigya Settings item once created.

 

xDB Mapping

 

Sitecore comes with several built-in facets and these can be mapped to Gigya properties.

As an example, select the xDB Contact Personal Info item. Here you can specify Gigya properties that will be mapped into the xDB facet properties:

 

There is also a Gigya Custom xDB Facet Folder where you can create mappings which will be stored in the custom Gigya facet. For example to map profile.birthYear to Birth Year you would create an item beneath the folder like this:

 

To add a new Gigya facet property so that it appears in the dropdown, create a new item beneath /sitecore/system/Modules/Gigya/Facet Names:

 

Sitecore 9’s module also includes a Gigya PII Custom xDB Facet Folder which should be used for storing PII sensitive data:

 

For more information about PII Sensitive data in Sitecore, see https://doc.sitecore.net/developers/xp/xconnect/xconnect-model/facets/#piisensitive 

For more information about showing custom facets in experience profile, see https://www.switchit.com/blog/sitecore/displaying-custom-facets-in-contact-profile.aspx

Email, Phone Number and Address Mapping

Within Sitecore you can map Gigya fields to multiple xDB items. As an example, create a new xDB Email Address item beneath the xDB Contact Email Addresses item. The key field should be the name of this email mapping in xDB. Typical values would be Primary, Home, Work, etc.

 

Renderings

Each page that requires Gigya functionality must have the /sitecore/layout/Renderings/Modules/Gigya/Settings rendering added. The best way to do this is by adding:

@Html.Sitecore().Rendering(Sitecore.Gigya.Module.Constants.Renderings.SettingsId)

to the <head> section of your layout file.

Included in the module package is a sample MVC layout at /Views/Gigya/SampleMvcLayout.cshtml.

An alternative way is to add it to the standard values for the base template that is used for Sitecore pages by going to the Sitecore Content Editor and select the _Standard Values item for your base template. Click on the Presentation tab and then Details.

 

Click the Edit link for the Default section and then click the Controls tab:

 

Click Add and Select the Settings rendering at Renderings/Modules/Gigya/Settings. Specify a placeholder that is in the <head> section of your layout e.g.,

 

To have different settings per language variant the renderings need to be added to the final layout instead of the shared layout.

The views for each rendering are stored in the /Views/Gigya folder. It is recommended that these are not modified as they could be overwritten with future upgrades (although Sitecore will warn you about overwriting).

The Gigya module comes with 4 additional renderings:

Login

 

Field NameDescription
LabelThe text that is applied to the login button.
Logged In URLA URL that the user will be taken to once they are logged in. If not specified, the current page will be reloaded.
Screen SetThe Gigya Screen-Set that will be displayed. The default is Default-RegistrationLogin .
Render MethodOptions are Popup or Container. Popup will show the Gigya screen as a popup modal. Container will render the Gigya Login screen embedded into the page. Popup is the default.
Container IdIf the Render Method is set to Container, this field allows you to specify the Id of an HTML <div> element on the page where the Gigya screen will be embedded. If not provided, a container will be generated automatically.

 

Register

 

Field NameDescription
LabelThe text that is applied to the button.
Logged In URLA URL that the user will be taken to once they are logged in. If not specified, the current page will be reloaded.
Screen SetThe Gigya Screen-Set that will be displayed. The default is Default-RegistrationLogin .
Render MethodOptions are Popup or Container. Popup will show the Gigya screen as a popup modal. Container will render the Gigya Login screen embedded into the page. Popup is the default.
Container IdIf the Render Method is set to Container , this field allows you to specify the Id of an HTML <div> element on the page where the Gigya screen will be embedded. If not provided, a container will be generated automatically.

 

Edit Profile

 

Field NameDescription
LabelThe text that is applied to the button.
Logged In URLA URL that the user will be taken to once they are logged in. If not specified, the current page will be reloaded.
Screen SetThe Gigya Screen-Set that will be displayed. The default is Default-ProfileUpdate .
Render MethodOptions are Popup or Container. Popup will show the Gigya screen as a popup modal. Container will render the Gigya Login screen embedded into the page. Popup is the default.
Container IdIf the Render Method is set to Container , this field allows you to specify the Id of an HTML <div> element on the page where the Gigya screen will be embedded. If not provided, a container will be generated automatically.

 

Logout

 

Field NameDescription
LabelThe text that is applied to the button.
Logged Out URLA URL that the user will be taken to once they are logged out. If not specified, the current page will be reloaded.

 

Error Messages

The default error message that is displayed to the user is Sorry an error occurred.   This can be changed by editing /sitecore/system/Modules/Gigya/Dictionary/Gigya/Generic Error.

 

Debugging

Ensure that Debug Mode on the Gigya settings item that is used for the current site is selected. This will produce additional details in the logs. Gigya related logs have a prefix of [Gigya]. If debug mode is enabled, debug messages will also be written to the browser console.

 

Encryption

The application secret key is encrypted and stored in Sitecore. The encryption key can either be stored in a Sitecore setting Sitecore.Gigya.Module.Encryption.Key or you can provide a path to a file that contains the key by setting Sitecore.Gigya.Module.Encryption.KeyLocation

A default key is provided but it is strongly recommended that this is changed by patching the config instead of editing Gigya.Module.Connector.config.

 

Customization

After a successful login or register, a “gigya-cms-logging-in” class is added to the body element of the page. This allows you show or hide content while the page is reloading or the user is being taken to another page. An example of this is provided in SampleMvcLayout.cshtml.

The module provides several pipelines which can be used for advanced customization, see below:

PipelineArgument TypeDescription
gigya.module.getGigyaValueSitecore.Gigya.Module.Pipelines .GigyaGetFieldEventArgsCalled before getting a value to update the users membership profile.
gigya.module.getAccountInfoMergeCompletedSitecore.Gigya.Module.Pipelines .AccountInfoMergeCompletedPipelineArgsCalled after gigya.module.getAccountInfoCompleted pipeline.
gigya.module.getAccountInfoCompletedSitecore.Gigya.Module.Pipelines .GetAccountInfoCompletedPipelineArgsCalled after calling Gigya’s getAccountInfo web service.   Allows you to modify the response from Gigya on the fly.
gigya.module.registeredSitecore.Gigya.Module.Pipelines .AccountPipelineArgs. AccountPipelineArgsCalled when a user is registered.
gigya.module.loggedOutSitecore.Gigya.Module.Pipelines. AccountPipelineArgsCalled when a user is logged out.
gigya.module.loggedInSitecore.Gigya.Module.Pipelines. AccountPipelineArgsCalled when a user is logged in.
gigya.module.legacyFacetUpdatingSitecore.Gigya.Module.Pipelines. FacetMapperPipelineArgsSC9 only. Called before a legacy facet is updated.
gigya.module.legacyFacetUpdatedSitecore.Gigya.Module.Pipelines. FacetMapperPipelineArgsSC9 only. Called after a legacy facet is updated.
gigya.module.facetUpdatingSitecore.Gigya.Module.Pipelines. FacetMapperPipelineArgsCalled before a facet is updated.
gigya.module.facetUpdatedSitecore.Gigya.Module.Pipelines. FacetMapperPipelineArgsCalled after a facet is updated. This gives you the opportunity to change facet values before they are saved.
gigya.module.facetsAllUpdatedSitecore.Gigya.Module.Models.Pipelines.FacetsUpdatedPipelineArgsCalled after all facets are updated but before they are submitted to the database.   This pipeline gives you the opportunity to update another facet.

 

Pipeline Arguments

Sitecore.Gigya.Module.Pipelines.GigyaGetFieldEventArgs:

public dynamic GigyaModel { get; set; }
public string CmsFieldName { get; set; }
public string GigyaFieldName { get; set; }
public object GigyaValue { get; set; }
public string Origin { get; set; }

Sitecore.Gigya.Module.Pipelines.AccountInfoMergeCompletedPipelineArgs:

public AccountInfoMergeCompletedEventArgs EventArgs { get; set; }

Sitecore.Gigya.Module.Pipelines.GetAccountInfoCompletedPipelineArgs:

public GetAccountInfoCompletedEventArgs EventArgs { get; set; }

Sitecore.Gigya.Module.Pipelines.AccountPipelineArgs.AccountPipelineArgs:

public User User { get; set; }

Sitecore.Gigya.Module.Pipelines.FacetMapperPipelineArgs:

public T Mapping { get; set; }
public dynamic GigyaModel { get; set; }

Sitecore.Gigya.Module.Models.Pipelines.FacetsUpdatedPipelineArgs:

public MappingFieldGroup Mappings { get; set; }
public dynamic GigyaModel { get; set; }

 

Example to change or add new values

For additional documentation about Sitecore Pipelines see http://sitecore-community.github.io/docs/pipelines-and-events/pipelines/

For example, to implement the gigya.module.getAccountInfoCompleted pipleline create a new .config file with something like this and add it inside the App_Config directory of your site.

<configuration xmlns:patch="http://www.sitecore.net/xmlconfig/">
<sitecore>
    <pipelines>
      <gigya.module.getAccountInfoCompleted>
        <processor type="Sitecore.Gigya.Module.Tests.Pipelines.GetGigyaInfoCompletedTest, Sitecore.Gigya.Module.Tests"/>
      </gigya.module.getAccountInfoCompleted>
    </pipelines>
  </sitecore>
</configuration>

Then you’ll need to implement the code for your pipeline and include the dll in the website’s bin folder:

namespace Sitecore.Gigya.Module.Tests.Pipelines
{
    public class GetGigyaInfoCompletedTest
    {
        public void Process(GetAccountInfoCompletedPipelineArgs args)
        {
            // add a new field
            args.EventArgs.GigyaModel.profile.customField = "hello this is a custom value";

            // overwrite an existing field
            args.EventArgs.GigyaModel.profile.firstName = "GetGigyaInfoCompletedTest";
        }
    }
}

 

Personalization

The module includes a custom personalization rule that allows you to personalize on data in the Gigya (and GigyaPii if using SC9+) facet.   To personalize content first open the Experience Editor in Sitecore. Highlight the component you want to personalize and click the personalize button:

 

Click the Plus icon next to Personalize the presentation of the component:

 

Click the Edit Rule button and search for facet:

 

Click the facetproperty link and expand the Gigya node. Select the facet property that you want to personalize on and click OK:

 

Select an operator to use.

Click the facetvalue link and specify a value. In our example we are going to show content for young people by specifying the Age needs to be less than 30:

 

Click OK and select some content to display when this rule passes. Save and publish the site.

More information about personalization can be found here - https://doc.sitecore.net/sitecore_experience_platform/digital_marketing/personalization/walkthrough_personalizing_components

The rule that ships with the module only supports basic personalization. Adding more powerful rules is quite easy and there are many guides available, such as https://www.geekhive.com/buzz/post/2016/11/sitecore-custom-personalization-rule/

Sitecore also supports personalization without using xDB and thus it’s possible to personalize using membership properties. Search for the available rules for profile and you’ll see several rules that allow you to personalize on user profile properties.

Data Centers

The module comes with the following built-in data centers:

  • US1
  • EU1
  • AU1
  • RU1
  • CN1

Adding a new data center is easy and can be done by creating a new item beneath /sitecore/system/Modules/Gigya/DataCenters.

 

Sitecore 9

The Sitecore 9 version of the module uses xConnect for xDB. In order to use the custom Gigya Facet you need to copy the provided Sitecore.Gigya.XConnect.Models.GigyaXConnectFacetModel.1.0.json file to the \App_data\Models and \App_data\jobs\continuous\IndexWorker\App_data\Models folders in your xConnect instance.

Deploy this file after you have installed the module.

 

Migration From Previous Version

If you are using a previous version of the module, please go to /sitecore%20modules/gigya/migration.aspx to begin the migration once the new version is installed.

This page will allow you to specify a database to perform the migration on. The default is master. This page is only available to Sitecore Administrators.

The migration procedure will read the current settings of the original module and import them into the new module. This process involves updating the global settings (API key, Application Key, application secret, enabled providers and data center). It will also create the user profile properties and, the assumption is that, each field will be of type Single-Line Text. You will have the opportunity to change the type after migration.

 

After clicking the Migrate button you will be shown a log with the status of the migration and any errors that occurred. The items will be updated in the database specified (defaults to master) and will need to be manually published afterwards by publishing the site. This log is also written the standard Sitecore log file.

 

After migration you can disable the previous module by renaming Sitecore.Gigya.Connector.config to Sitecore.Gigya.Connector.config.disabled and removing Gigya.dll and GigyaSecurityProvider.dll from the bin directory.

 

Breaking changes between old module and new module

  • Social plugins are no longer supported.
  • Membership sync is now one way only – from Gigya to Sitecore.

Sitecore Required Fields

The only required Sitecore field is username which is automatically set to Gigya’s UID.

Email is populated by default if a value is set in the profile.email Gigya field.

 

Sitecore Delete Sync

The Sitecore Delete Sync module allows you to delete your users from Sitecore when the user is deleted from Gigya. Delete Sync is only available for use with Sitecore 9 GConnector version 6.1 or above.

Delete Sync Installation

Download the Delete Sync module from:

Gigya Developer Downloads

  • Login to the Sitecore backend by going to /sitecore .
  • On the dashboard, click the Desktop icon.
  • Click the Sitecore Start icon -> Development Tools -> Installation Wizard.
  • Click Upload package and select the .zip file that you downloaded above.
  • Publish the site.

 

Delete Sync Settings

Once the module is installed you can configure your settings by logging into Sitecore and going to Administration -> Settings -> Gigya Delete Sync.

 

The following fields are available on the Gigya Settings template:

Field NameDescription
EnabledWhether the module is enabled.
Action

The delete action to take:

  • Full deletion
  • Delete notification
Delete Job FrequencyHow often to run the job, in minutes. The maximum allowed value is 1440 (24 hours).
Number of attempts for each fileThe maximum number of attempts to process the file. A file will only be retried if all the UIDs in the file failed.
Email on successA comma-separated list of emails that will be notified when the job completes successfully.
Email on failureA comma-separated list of emails that will be notified when the job completes with errors.
S3 bucket nameAWS S3 bucket name that contains the UID files.
S3 access keyAWS S3 access key.
S3 secret keyAWS S3 secret key that is encrypted. Only Adminstrators and users with the Gigya Major Admin role can edit and view this field.
S3 object key prefixAWS S3 object key prefix.
S3 regionAWS S3 region, e.g., eu-west-2
User DomainsThe user domain associated with the front end site (the default is extranet).

 

After installation you will need to create 2 new profile fields if you which to support Delete Notification mode.   This mode doesn’t physically delete the user but marks them as deleted. To create the fields, login to Sitecore and switch to the core database. In the Content Editor, navigate to the user profile path and select the profile that is being used by Gigya (/sitecore/templates/System/Security/User).

On the Builder tab, create 2 new fields:

Field NameData Type
GigyaDeletedDateDatetime
IsDeletedCheckbox

 

Delete Sync Events

To run your own code whenever a user is about to be deleted you can implement the gigya.module.deletinguser pipeline, for example:

<sitecore>
    <pipelines>
      <gigya.module.deletinguser>
        <processor type="Sitecore.Gigya.Module.DeleteSync.Tests.Pipeline.DeletingUserTest, Sitecore.Gigya.Module.DeleteSync.Tests"/>
      </gigya.module.deletinguser>
    </pipelines>
  </sitecore>
public void Process(DeleteSyncPipelineArgs args)
        {
            // setting this to false will skip the processing of this user
            args.EventArgs.ContinueWithDeletion = false;
        }

 

When the pipeline is triggered you will receive an event args object with these parameters:

PropertyDescription
UidThe Gigya UID of the user being deleted.
ActionAn enum showing the type of deletion (soft or hard delete).
UserThe Sitecore User object.
ContinueWithDeletionSet this to false to abort the deletion of the user.

 

To run your own code whenever a user has been deleted you can implement the gigya.module.deleteduser pipeline, for example:

<sitecore>
    <pipelines>
      <gigya.module.deleteduser>
        <processor type="Sitecore.Gigya.Module.DeleteSync.Tests.Pipeline.DeletedUserTest, Sitecore.Gigya.Module.DeleteSync.Tests"/>
      </gigya.module.deleteduser>
    </pipelines>
  </sitecore>
public void Process(DeleteSyncUserDeletedPipelineArgs args)
        {
            // run some custom code
        }

 

When the pipeline is triggered you will receive an event args object with these parameters:

PropertyDescription
UidThe Gigya UID of the user being deleted.
UserThe Sitecore User object.
ActionAn enum showing the type of deletion (soft or hard delete).

 

Delete Sync Troubleshooting

Ensure there are no firewall restrictions blocking access to Amazon’s S3 server.

A log of which files have been processed is saved in /sitecore/system/Modules/Gigya Delete Sync/Processed Files.   To reprocess all files in the S3 bucket, clear the contents of the Processed field.

 

Troubleshooting

General

  • The server clock must be set to GMT+0, otherwise errors and unexpected behaviors may occur. We recommend using NTP daemon to ensure that the server time is accurate.
  • Gigya screen-sets must entirely replace any login, registration etc. screen provided by the CMS. The CMS registration, login and edit profile screens should not be rendered at all. Otherwise, the Gigya screen is placed inside the CMS screen and both will behave unexpectedly. 
  • After changing the value of the application key, you should re-enter the application secret.

 

 

Site settings are not being used

See the Settings section, above, and ensure that the settings item is called Gigya Settings or matches the path configured for the site in the config file.

  

  

 

 

There is also a “Gigya Custom xDB Facet Folder” where you can create mappings which will be stored in the custom “Gigya” facet.   For example to map profile.birthYear to Birth Year you would create an item beneath the folder like this:

Click the “facetproperty” link and expand the Gigya node.   Select the facet property that you want to personalize on and click OK:

  • No labels