Page History

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

 

Another option is to set the global configuration object with a global variable, instead of the inner text of gigya.js script tag:

 

Code Block
languagejs
linenumberstrue
window.__gigyaConf = {enabledProviders:'facebook,twitter'};
Info

If you choose to set the global configuration object with a global variable, you must declare it before the gigya.js script is loaded.

Additionally, although the global Conf object can accept any parameter that is used by any Gigya API, all possible parameters are not listed in this table. The most commonly used parameters are listed below, because, although many APIs may use the same parameter, you may not necessarily want the value of that parameter to be the same for all APIs, i.e., setting the containerID parameter within the global Conf object will cause all APIs that accept a containerID to display in the same defined <div> overwriting any previously displayed UI.

 

Data Members

 

RequiredField NameTypeDescription
No
APIKeystringThe application key associated with the calling application. An API Key may be obtained from the Site Dashboard page on Gigya's website.
No
actionCounterPathstringFor use by customers implementing Signals and monitoring Page views. For an example of using actionCounterPath see Top Content configuration in Customer Insights. The actionCounterPath must start with a forward slash "/" (representing the 'root') and can be set to "path" values that were registered on the  Signals page  or through  accounts.registerCounters Setting an actionCounterPath automates page view counting: there is no need to call accounts.incrementCounters (gigya.js must be included in the page)
No
bypassCookiePolicystringDetermines whether gigya.js should check if third-party cookies are blocked by the user's browser (and implement a workaround if necessary). The possible values are:
  • never: The JS SDK should not check whether third-party cookies are blocked.
  • whenBlockedByDefault: The JS SDK should check if third-party cookies are blocked only if it recognizes a browser that blocks third-party cookies from unvisited websites by default (Safari).
  • always: The JS SDK should always check if third-party cookies are blocked, regardless of the user's browser.

See Blocked Third-Party Cookies for more information.

No
cidstring
Include Page
Template_gs api cid description
Template_gs api cid description
No
customEventMapJSON
object

The customEventMap object is used to override or add to the events tracked by Gigya in the default 'Event Map'. For detailed information on using this option, see Overriding the Default Event Map. Note that one use case of both the default Event Map and the custom one is when integrating with Google Analytics

No
dateFormatstringThe format of the date. The days, months, and years can be represented as follows: 
  • %d - a one-digit representation of the day of the month, 1-31
  • %dd -  a two-digit representation of the day of the month, 01-31
  • %M - a one-digit representation of the month, 1-12
  • %MM - a two-digit representation of the month, 01-12
  • %MMM - the abbreviated name of the month, e.g. Jun, Jul
  • %MMMM - the full name of the month, e.g. July, August
  • %yy - a two-digit representation of the year, 01-99
  • %yyyy - a four-digit representation of the year, 2013

For example: dateFormat: "%d/%M/%yy" - > 29/5/12, or dateFormat: "%MMMM %d, %yyyy" - > May 29, 2012.

No

defaultRegScreenSet / defaultMobileRegScreenSet

stringFor use by Registration-as-a-Service customers. The ID of a previously defined registration screen-set for use in new user registration. Overrides the default registration screen-set defined in accounts.setPolicies.
Customers who want to implement their own registration screen should set this parameter to blank and bind a callback function to the OnError event wherever pending registration error 206001 appears.     
No
deviceTypestring

Specifies the type of the device the UI is to be displayed on. The possible values are:

  • desktop
  • mobile
  • auto - When this value is used, you must also include the following meta tag in the <head> section of your site for mobile devices to be automatically recognized:

     

    Code Block
    languagexml
    linenumberstrue
    // This must be the first item beneath the document <title></title> of
    // the <head> section of your page!
    <meta name="viewport" content="width=device-width">  

     

    Otherwise, the device will be recognized as a desktop device.
No
disabledProvidersstring
Include Page
Template_gs api disabledProviders parameter description
Template_gs api disabledProviders parameter description
Include Page
Template_gs api list of providers lower-case
Template_gs api list of providers lower-case
No
enabledProvidersstring
Include Page
Template_gs api enabledProviders parameter description
Template_gs api enabledProviders parameter description

"facebook, twitter, yahoo, linkedIn, microsoft, googleplus, foursquare, vkontakte, renren, qq, sina, aol, blogger, wordpress".
In addition the following providers are supported and may be added explicitly: 
" netlog, orangefrance, mixi, yahoojapan, spiceworks, livedoor, paypal, paypaloauth, amazon".
You may use the '*' sign as an indication to include all the default providers. If you would like the API methods to apply to Netlog in addition to all the default providers, define: enabledProviders:"*,netlog".
Varies
enableSSOTokenbooleanIn an SSO group environment, this parameter must be set to true prior to calling accounts.setSSOToken. See Blocked Third-Party Cookies for additional information.
No
forceAuthenticationBoolean
Include Page
Template_gs api forceAuthentication parameter description
Template_gs api forceAuthentication parameter description
No
facebookExtraPermissions

 

stringA comma-delimited list of Facebook extended permissions to request from the user. This parameter gives the possibility to request extended permissions in addition to the permissions that Gigya has already requested.
Please refer to Facebook's extended permissions page, for the complete list of permissions.
For example, if you wish to RSVP to events on the user's behalf and to send text messages to the user, define: 
facebookExtraPermissions : "rsvp_event,sms "
Note: use the socialize.getRawData method to pull the extra data. 
No
googleExtraPermissionsstringThis parameter gives the possibility to request extended permissions in addition to the permissions that Gigya is already requesting. The supported values are: "wallet" - for Google wallet permissions.
No
langstring

Define the language of Gigya's user interface and error message. The supported languages and their codes can be found in our Language Support guide. For example:

Code Block
languagejs
linenumberstrue
lang: "zh-hk";

For best practice, place the lang parameter in the url following the API Key rather than inside the Global conf object.

For Example (to return errors in Spanish):

Code Block
languagejs
linenumberstrue
<script type="text/javascript" 
src="https://cdns.gigya.com/js/gigya.js?apiKey=INSERT-YOUR-APIKEY-HERE&lang=es">
{
  autoLogin: true,
  enabledProviders: 'facebook,twitter'
}
</script>
No
newUsersPendingRegistrationBooleanThe default value of this parameter is 'true'. The default behavior - when a new user logs-in (registers) his new Gigya account is not considered final until socialize.notifyRegistration is called. While being not-final the identities associated with this account can be connected to another account without causing an error.
If this parameter is set to 'false' - when a new user logs-in (registers), his new Gigya account is final immediately.
No
oauth_tokenstringThe OAuth token returned by Gigya's servers when consuming services in a hybrid client/server model. For more information about requesting an OAuth token, see socialize.getToken
The token is a privileged token that has almost the same permission as using an API key with the secret, and for this reason should only be passed down to the end user when necessary.
No
providerstringThe optional values for this parameter are: facebook, twitter, googleplus, linkedin, messenger, instagram, renren, yahoo, vkontakte, mixi, yahoojapan, odnoklassniki , wechat.

SAML providers are also supported - the format of the provider name is saml-<name> .

See specific API methods that use this parameter to determine expected results.

No
regSourcestringOrigin of the registration. Can be any string value. regSource will typically hold the URL of the registration page, the default is the current URL. Can be used to set varying destination pages in accounts.setPolicies.
Note: regSource is populated automatically only when the accounts.showscreenset API call is on the page, otherwise you must populate it yourself.
No
sessionExpirationinteger
Include Page
sessionExpiration Parameter Template
sessionExpiration Parameter Template
No
shortURLsstring
Include Page
Template_gs api shortURLs description
Template_gs api shortURLs description
No
signIDsBooleanThe default value is "false". If this field is set to "true", the User object returned by socialize.getUserInfo method and the Friend objects returned by socialize.getFriendsInfo or socialize.showFriendSelectorUI methods will be signed by Gigya. To learn more about signatures, please refer to the Security page of the Developer's Guide.
No
trackAddressBarSharesBoolean
Anchor
trackAddressBarShares
trackAddressBarShares
The default value of this parameter is '
false '. If set to ' true ', the  referred traffic that is identified as originally shared after a URL was copied by a user and sent out (via email or other means) will be tracked and used in the Referred Traffic and Referred Traffic by Provider reports.
Parameters used when initializing socialize: 
No
autoLoginBoolean

This parameter determines whether after a user logs in once to the site and visits again, he is automatically logged back into the site if he is logged into Facebook or Google+ at that time. If you set this value to 'true', make sure Native SDK Capabilties are enabled in the Providers Configurations for your app.

The default value is 'false'.

Info

Note that once a user authorizes your app to access his social network account, if you then delete the user's account from Gigya (for whatever reason), and the user returns to your site, the app, already having the user's permissions, will attempt to automatically login the user again, and if successful, a new account will be created for the user.

To be treated as a completely fresh unknown user to your site, the user would have had to revoke your app's permissions prior to returning to your site.

No
facebookInitParamsJSON objectAn object with Facebook initialization parameters, which can override the original FB.init parameters. This includes channelUrl and other Facebook initialization parameters.
Deprec
connectWithoutLoginBehaviorstring Deprecated.

 

Global Configuration in a Site Group Scenario

Include Page
Global Configuration in a Site Group Scenario
Global Configuration in a Site Group Scenario
 

Backwards

Backward Compatibility

The Global Conf object as described here replaces an older form of a  conf  object that we still support for backward compatibility. The advantage of the new form is that the variables are set before loading gigya.js, while in the old form they are set after. 

In the old form the  conf  object was created once as a global  var and passed as the first parameter of all API calls, setting global configuration parameters. Originally all our API methods were called with two parameters,  conf  and  params . For example: 

Code Block
languagejs
linenumberstrue
var conf = {
  enabledProviders:  'yahoo,googleplus'
};...
gigya.socialize.getUserInfo(conf, params);

 

If you are already using the old form of the  conf  object, you may keep using it, although we encourage you to move to the new form. Note that some parameters, such as autoLogin, cannot be set via the old form of the  conf  object, since they must be set before loading gigya.js.

Since we still support the  conf  object as a parameter in API calls, if you decide to pass the  conf  object to an API method, the variables set there will override any identical variables set in the global configuration object (the new form). For example, if the new form global configuration object defines Facebook and Twitter as the enabled providers, and the  conf  object defines Yahoo and Google+ as the enabled providers, the enabled providers will be Yahoo and Google+:

 

Code Block
languagejs
linenumberstrue
<script type="text/javascript" src="http://cdn.gigya.com/js/gigya.js?apiKey=INSERT-YOUR-APIKEY-HERE">
{
   enabledProviders: 'facebook,twitter'
};
</script>
<script>
var conf = {
    enabledProviders:  'yahoo,googleplus'
 };
</script>
The  params  object, that used to be the second parameter, is now passed as the only parameter (i.e., gigya.socialize.getUserInfo(params);). The  params object enfolds all the specific parameters of the API method. In the Web SDK Reference you may find per API method the list of parameters ( params object members) that the method accepts - some are required and some are optional. The variables set in the  params  object will override any identical variables set either in the global configuration object or the  conf object if defined. 

Important Note

Warning

Be careful not to use any undefined variables inside the global Conf object, you will not receive any runtime errors, however, the Web SDK will function erratically and many subsequent method calls may fail with Unauthorized User errors.

 


...