Integrating Gigya with Adobe Experience Manager (AEM) enables you to add Gigya’s Registration-as-a-Service (RaaS) to your AEM sites quickly and easily as well as leverage Gigya\'s user profile data for content personalization and optimization. Adobe Experience Manager is an enterprise-class content management system for building websites, mobile apps, and forms while delivering consistent experiences across all channels.

 

Overview

Adobe Experience Manager is an enterprise-class content management system for building websites, mobile apps, and forms while delivering consistent experiences across all channels.

The Gigya module for Adobe Experience Manager enables you to add Gigya’s Registration-as-a-Service (RaaS) to your AEM sites quickly and easily as well as leverage Gigya’s user profile data for content personalization and optimization.

Features

The module enables integrating Gigya’s Registration-as-a-Service (RaaS) with websites and apps built and maintained using AEM. This means connecting your AEM sites to Gigya's user database, including out-of-the-box flows for registration, login and profile management, and providing user management tools for the administrator.

The module synchronizes Gigya's entire offering of profile and social data about a site visitor into AEM, automatically syncing identity data from Gigya to AEM. The information includes complex data fields, such as a user's list of Likes or Favorites. 

The Gigya information is made available through a Session Store named "Gigya Profile Data".
The following screenshot from CRXDE Lite shows a user who has logged in through Gigya. The Gigya data is available in the user's gigya folder:

Click to enlarge screenshot

The user's favorites can be found under gigya > favorites:

Click to enlarge screenshot

The following is an examples of how complex fields will be rendered by the Client Context object (in this case, Likes that belong to the subcategory "Causes"):

Click to enlarge screenshot

Versions and Compatibility

Limitations

Setup and Configuration

1.

Install the Gigya Package

2.

Add Gigya Core as a Cloud Service

3.

Add the Cloud Service to Your Site

4.

Configure Your Gigya Account for RaaS

 

1. Install the Gigya Module

Contact your Gigya for information on activating the Gigya integration.

The Gigya module is available as a package for AEM.

To install the package:

  1. Download the package from here:  
  2. In your AEM server, go to the CRX Package Manager at /crx/packmgr/.
  3. Select Upload Package in the top menu.
    Click to enlarge screenshot
  4. Browse for the package file and upload it.
  5. The package now appears in the packages list. Select it and click Install.

2. Add Gigya Core as a Cloud Service

First, configure the Gigya Core Cloud Service with your implementation details:

  1. Go to Tools > Operations > Cloud > Cloud Services.
  2. Find Gigya Core and click its Show Configurations link.
  3. Click the + icon to add a new configuration.
  4. In the Create Configuration window, give the new configuration a title.
  5. If desired, set a Parent Configuration that this configuration will inherit all values from. Note that child settings will completely override parent settings rather than append values.
  6. Click Create to create the new cloud service configuration.
  7. In the settings page that opens, click the Edit button to enter your integration settings (see parameter table below).

Click to enlarge screenshot

Required?SettingDescription

API Key

Copy and paste the API key that was generated in the Gigya console for your domain. To view the API key go to your Gigya Dashboard , open Site Settings for your site and click Show API key. For more information on viewing the API key or to adding your site to the console, see Site Setup.

Application Key

Enter an Application Key and Application Secret that you have created in Gigya. These credentials enable the integration to access and work with the Gigya database. See instructions for generating/finding your application key and secret.

Application Secret
Gigya Secret Key Optional (not recommended): instead of entering an App Key + App Secret, it is possible to use your Gigya Secret. To view the Secret key go to your Gigya Dashboard and click the Show Secret key link next to your Partner ID at the bottom of the site list. If you enter your Gigya Secret, you can leave the App Key and App Secret fields empty.

Gigya Data Center

The Gigya data center associated with your account, as it was selected in the Gigya console when you set up your site.

Enabled Providers

The social networks and other identity providers to be used for social login, e.g. “Facebook,Yahoo,Twitter”. The default * setting includes all available networks. For the full list of available providers, refer to the global configuration object page.

Default: *

Language

Select a supported language for display on your website, or let the module recognize the site language automatically (default)

Default: Auto

Advanced Configuration

This box enables you to specify configuration options beyond those available in the fields above, in JSON format. The required format is {"key1": "value1", "key2": "value2", ...} .

For example, the following code sets values for the Global Configuration enabledProviders and shortURLs keys:

{
	"enabledProviders":"facebook, twitter",
	"shortURLs":"whenRequired"
}

For the list of available configuration options, see Global Configuration.

Path in AEM User Directory

  • Leave this empty to use the default directory: home/users/.
  • Enter a directory name to save users to a sub-folder under home/users/, with a nested depth of 2. For example, enter MySite to have users saved under home/users/MySite plus two additional sub-folders.
  • Enter a directory name to save users to a sub-folder under home/users/, and an AEM User Directory Depth, to save users to the specified path with the specified depth.
AEM User Directory DepthWhen using a user directory path, defines how many intermediate levels user creation should make (for performance reasons). If left empty, the default depth is 2.

3. Add the Cloud Service to Your Site

Click to enlarge screenshot

4. Configure Your Gigya Account for RaaS

(i) Make Sure RaaS is Enabled for Your Account

RaaS is a premium package that requires separate activation. If it is not part of your site package please contact your Gigya .

(ii) Set Email to be the Primary User Identifier

Email is the required user identifier for an AEM site by default. To configure your Gigya account appropriately:

Click to enlarge screenshot

Click to enlarge screenshot

 

Gigya Generated ID Based User Creation

By default, users are created using their Gigya email address and, if it does not exist, their username.  On some Gigya setups where the same email is allowed multiple times, this causes issues with user creation and maintenance, so users may be created based on an ID generated from their GigyaUID instead.  This can be configured by logging into AEM and navigating to:

[Your AEM Server]/system/console/configMgr

 

  Then search for the Gigya RaaS Login Module Configuration, as shown below:

 

Setting Up User Synchronization (Optional)

If you have decided to create users within AEM using a generated ID, it is recommended you use AEM's User Synchronization functionality (https://helpx.adobe.com/experience-manager/6-3/sites/administering/using/sync.html). By default, the GConnector creates users across multiple instances only when needed (i.e., lazily). With generated ID's, this means the same Gigya user may not have the same AEM user ID across instances. Using AEM's User Synchronization solves this issue by keeping users consistent across instances.

User Synchronization is always recommended if there are multiple published instances and the GConnector is configured to generate IDs. User Synchronization is required if, in addition to having multiple instances and generating IDs, the id's are also used for other functionality (such as out-of-the-box communities).

If setting up User Synchronization on instances that have already been in use, you may need to do an initial manual sync of users as described by Adobe (https://helpx.adobe.com/experience-manager/6-3/sites/administering/using/sync.html#ManuallySyncingUsersandUserGroups)

 

Authentication Handler Configuration

By default, user registration has a timeout of 5 seconds (500ms x 10 tries) to allow the JCR to reindex after user creation. Under heavy load, it's possible that a some registrations may timeout. This can be mitigated by configuring the Gigya authentication handler with a longer timeout.

 

Adding Gigya RaaS Components to Pages

Gigya RaaS elements will be available as components you can add to your pages.

To add RaaS components:

Make sure that the screen-set IDs you specify here match the screen-set IDs defined for your site in the Screen-Sets page in the Gigya console. See Default Screen-Sets for more information.

To make sure Gigya's cookies aren't blocked, add the cookie "gigyaLogout" to "optout.whitelist.cookies" under com.adobe.granite.optout (see more information).

Publishing to the Storefront

When you are done making changes, publish them to the storefront as follows:

  1. Replicate the package:
    1. Go to the CRX Package Manager.
    2. Select the Gigya package and select More > Replicate.
      Click to enlarge screenshot
  2.  Activate the page:
    1. Go to the page in the admin site and add /cf#/ to the URL as follows: http://server:port/ cf#/content/geometrixx-media/en.html
    2. Select Page > Activate Page
      Click to enlarge screenshot

Field Mapping

The following Gigya fields are synced by default to AEM fields:

They can be removed from the Custom Gigya Schema Fields dialog option if preferred.

Any implementations using a GConnector prior to 6.3.1.3, when migrating, will be required to re-configure all fields.

Gigya Profile FieldAEM Field
firstNamegivenName
lastNamefamilyName
gendergender
emailemail
citycity
countrycountry
statestate
zippostalCode
birthDay, birthMonth, birthYearbirthday

Mapping Gigya Fields to AEM

You can map existing Gigya fields to AEM by using the Custom Gigya Schema Fields tool. You can map from any existing fields that would be returned from accounts.getAccountInfo

When mapping from custom data fields, ensure that the fields exist in the Gigya schema prior to mapping them in AEM.


 

Define Mapping

Source Path

The Source Path is the location of the field within the Gigya response from accounts.getAccountInfo, i.e., path/to/field/in/json/fieldName. For example, if the location of the field in the Gigya response is subscriptions.mySiteSubscription.isSubscribed, you would enter it like the following:

subscriptions/mySiteSubscription/isSubscribed

 

Destination Path

The Destination Path is the location in AEM that the value of the Gigya field will be stored, i.e., path/relative/to/usernode/newAEMFieldName. For example:

gigya/customFields/siteSubscriptionActive

 

Once your fields are saved, they can be accessed manually via CRXDE | Lite.

Reformatting Mapped Data

To reformat data you have receive from Gigya, for instance, if you need to concatenate the 3 Gigya fields that make up the user's birthday into a single field for AEM, you can use a Custom User Data Sync hook.

The “Custom User Data Sync” functionality is used to allow custom handling of fields when syncing data from Gigya to AEM. This hook is run synchronously after the default user data sync is run during login, registration, and when updating their profile.

To implement a custom user data sync service, simply implement the Interface GigyaCustomUserDataSyncService and make sure the new class is registered in OSGi as a service of that type. This interface has 2 methods, getRanking and syncCustomUserData. The getRanking method is used to determine what order the custom user data sync services should be run, and the syncCustomUserData method contains any custom handling of the data.

Getting Started with Custom User Data Sync

To help you get started, please follow these steps (if using maven):

Interface Name and Location

All Custom User Data Sync Services must implement:

com.gigya.aem/raas/GigyaCustomUserDataSyncService

Service Name

You may name the service however you like.

Function Name, File Path Classname

The Custom User Data Sync Service interface requires 2 methods:

 

Example Data Transformation

In the following code example we will take the Gigya firstName and lastName fields and concatenate them together into a single displayName field.

try {
    log.debug("Syncing " + user.getPath() + " custom user data");
    GigyaUserObject.Profile profile = gigyaUser != null ? gigyaUser.getProfile() : null;
    if (profile != null) {
	    String firstName = profile.getFirstName(),
    	lastName = profile.getLastName();
	    if (firstName == null)
  	        firstName = "";
	    else
  	        firstName = firstName.trim();
	    if (lastName == null)
  	        lastName = "";
	    else
  	        lastName = lastName.trim();
	    String displayName = firstName + (firstName.length()>0 && lastName.length()>0 ? " " : "") + lastName;
	    user.setProperty("myCustomFields/displayName", createValue(displayName, valueFactory));
	    log.debug("Setting myCustomFields/displayName to " + displayName);
	    return true;
    }
} catch (RepositoryException e) {
    log.error("Error creating value for myCustomFields/displayName", e);
}
return false;

 

Resources

Maven Dependency

To install the Maven dependencies, follow the instructions below:

 

File Example

Using Gigya in Multi-Tenant Installations

The integration supports the following multi-tenant (multi-site) installation configurations:

AEM Configuration

Tenant Configuration

Required Setup Process

One Instance of AEM

Tenants in same domain, in different sub-domains or sub-directories, e.g.:

  • blog.company.com
  • store.company.com
  • company.com/blog
  • company.com/store
  1. Set up one site in the Gigya console (tenants use the same Gigya API key).
  2. Set up the Gigya integration in AEM normally.
  3. Gigya will share the same user database between the different sites, and AEM should be configured to share the same users between the different sites, too.

Tenants in separate domains, e.g.:

  • company.com
  • company-store.com
  1. Set up a site for each tenant in the Gigya console (each tenant gets a separate Gigya API key), under the same partner.
  2. Define the sites as a a site group and connect via Single Sign-On (SSO).
  3. Set up the Gigya integration in AEM normally.
  4. Gigya will share the same user database between the different sites, and AEM should be configured to share the same users between the different sites, too.

If you want to keep separate user lists for your tenants, do not connect the sites through site group/SSO in the Gigya console.

For this configuration to work, the sites in Gigya must all be defined with the same data center (US, EU, etc.).

Multiple Instances (Installations) of AEMAny
  1. Set up a site for each tenant in the Gigya console (each tenant gets a separate Gigya API key), under the same partner.
  2. Define the sites as a a site group and connect via Single Sign-On (SSO).
  3. In each AEM installation, add the Gigya package and configure with the site's specific Gigya API key.
  4. Gigya will share the same user database between the different sites, and AEM should be configured to share the same users between the different sites, too.

Locating the Logout URL for a Site Group

The logout URL is necessary in order to set up Single Sign-On (SSO) properly. See User Logout for more information.

To find the logout URL:

Click to enlarge screenshot


Troubleshooting

AEM-Related Troubleshooting

 

Environment data is not visible to users ever and is not configurable, however, for reference only, here is an example of what is being sent:

"environment":"{\"cms_name\":\"Adobe Experience Manager\",\"cms_version\":\"6.3.0\",\"cms_major_version\": \"6.3.0\",\"gigya_version\":\"6.3.1.3\",\"lang_version\":\"Java 1.8.0_131\"}"

And an actual request param:

&environment=%7B%22cms_name%22%3A%22Adobe%20Experience%20Manager%22%2C%22cms_version%22%3A%226.3.0%22%2C%22cms_major_version%22%3A%20%226.3.0%22%2C%22gigya_version%22%3A%226.3.1.3%22%2C%22lang_version%22%3A%22Java%201.8.0_131%22%7D

 

 

 

Save