Lotame

Skip to end of metadata
Go to start of metadata

 

Gigya provides functionality for passing users' site and social information from your website to the Lotame Data Management Platform (DMP). This creates more detailed analytics and user insights, improving your understanding of your user base and allowing you to target ads on your site based on a user's dynamic information, such as age, gender, relationship status, country, likes, etc. This document is a guide to integrating Gigya with the Lotame platform.

Solution Overview

The solution has two parts:

  • Lotame setup - register and grab "Lotame ID".
  • Add Gigya to web-pages that use Lotame (see how-to below).

The solution assumes that users login/register through Gigya. 

Please create a test site in the Gigya admin console for integration testing (don't use your production site) and use a test list on the target integration platform. We are able to put integrations in "sample mode" for testing, which will restrict audiences to 10 sample accounts.

User Data

Access to user information requires that users login to the site through Gigya. 

If you are implementing Social Login, then after the user logs-in the data available in the User object may be pushed to Lotame. This object, which is returned by the socialize.getUserInfo method contains social information pulled from social networks.

If Gigya's Registration-as-a-Service (RaaS) package or Profile Management - IDS (IS) package is part of your site package, then the data returned by the accounts.getAccountInfo method may be pushed to Lotame. This includes social information pulled from social networks as well as site specific custom data.

To find out whether RaaS/IS package is part of your site package, or to activate RaaS/IS package, please contact your Gigya Account Manager or contact us by filling in a support form on our site.

Adding Gigya to a Web Page that Uses Lotame

This section demonstrates how to integrate Gigya with Lotame.

We take a simple web page that uses Lotame and add Gigya code to it, thus pushing the logged in user's data to Lotame.

Gigya's User object can contain data from a number of different providers and does not record the source of each field's user data. It does, however, store the original data received from providers in Identity objects which are held within the User object.  Gigya recommends that data passed to Lotame be taken directly from the Identity objects (rather than from the User object) because the data source is clearly identifiable. This makes it possible to securely prevent data from specific social networks from being passed to DMP sites, or from being used to target ads outside the customer's own server. Identity objects hold data for a particular provider and make it possible to ignore data that originates from specific social networks and avoid non-targetable social network data. Our code example below demonstrates retrieval of Identity objects from a User object.

A Simple Page that Uses Lotame (Without Gigya)

The following code inserts static data into Lotame:

To use the code enter your Lotame ID in the "src" line and in the lotame-id variable.  Enter a valid Lotame behavior type in the lotameBehavior variable.

<html>
<head>  
<!--  Lotame's JS lib (insert your Lotame ID): -->
    <script src="http://tags.crwdcntrl.net/c/[YOUR-LOTAME-ID]/cc.js?ns=_cc[YOUR-LOTAME-ID]" id="LOTCC_[YOUR-LOTAME-ID]></script>
</head>
<body>
<script>
var lotame-id = your lotame ID;                //<-------------- Enter your lotame ID here-----------------------------------------
var ccLotame = eval("_cc" + lotame-id);
var lotameBehavior  = lotame behavior type;    //<-------------- Enter ctax, genp or another Lotame behavior type here----

// ---Add data to Lotame.  For more information on Lotame IDs, behavior types and behavior collection points contact Lotame---
    // The next line adds the node "Gigya->Targetable->age" with the static value "35".      
ccLotame.add(lotameBehavior,"Gigya^Targetable^age^35");     
    // The next line adds the node "Gigya->Targetable->gender" with the static value "m". 
ccLotame.add(lotameBehavior,"Gigya^Targetable^gender^m");   
    //code for Lotame to deploy their "behavior collection point"
ccLotame.bcp();
</script>
</body>
</html>

The result is new nodes in a custom taxonomy in Lotame:

  • The node "Gigya->Targetable->gender" with the static value "m".
  • The node "Gigya->Targetable->age" with the static value "35".

Adding Gigya's Code

To use the code you must enter your Gigya API key and Lotame ID in the two src lines (src= etc.) 

In addition you need to enter your Lotame ID in the variable lotame-id and the lotame behavior type in the variable lotameBehavior.

The body section of this HTML registers an onLogin event and then calls the socialize.showLoginUI plugin.

When the user signs-in the onLogin event returns the User object to the web page.  User objects can also be retrieved using socialize.getUserInfo (not demonstrated in this code). The user object contains an array of providers and an Identity object for each provider, with the provider's data for this user.

Note that some social networks do not allow their user data to be transferred to direct marketing providers, while others do not allow certain fields to be used in targeted advertising outside the customer's site. It is the customer's responsibility to comply with any such restrictions placed by each individual social network. The code below shows how this is done, for example, if you do not want to transfer LinkedIn data,  or want to mark Facebook "age" data as non-targetable (i.e. you might use the age data for reporting purposes only). To achieve this, the onLogin event in the example calls the web-page's cbUserInfo function which extracts the identity object for each provider. LinkedIn data is ignored, and Facebook "age" data is marked as  non-targetable. Other fields (or providers) can be added as required.

The Example Code

<html>
<head>   
<!--  include Gigya's JS libs (insert your API key): -->  
<script src="http://cdn.gigya.com/js/gigya.js?apikey=[YOUR-GIGYA-API-KEY]"></script>   
<!--  Lotame's JS lib (insert your Lotame ID): -->    
<script src="http://tags.crwdcntrl.net/c/[YOUR-LOTAME-ID]/cc.js?ns=_cc[YOUR-LOTAME-ID]" id="LOTCC_[YOUR-LOTAME-ID]">    </script>
<script> 
 var lotame-id = your lotame ID;                //<-------------- Enter your lotame ID here-----------------------------------------
 var ccLotame = eval("_cc" + lotame-id);
 var lotameBehavior  = lotame behavior type;    //<-------------- Enter ctax, genp or another Lotame behavior type here----

    // ---Function "cbUserinfo" is called by the onLogin event generated by the plugin API gigya.socialize.showLoginUI.
    //    The onLogin event was attached by the API gigya.socialize.addEventHandlers
    //    This function extracts user data from the user object returned by the onLogin event ---
    //    userinfo is the data passed by the onLogin event (note: user is the user object).
var userinfo = { errorCode: errorCode, errorMessage: errorMessage, operation: operation, context: context, user: user };         
function cbUserInfo(userinfo) {
           
    //  The followng code reads the "providers" array in the user object.
    for (var i = 0; i < userinfo.user.providers.length; i++) 
    {
        // Each provider's name is moved into variable zprovider
        var zprovider = userinfo.user.providers[i]; 
        //The following section is only executed if the provider is not LinkedIn
        // LinkedIn does not allow its data to be used for advertising 
        if (zprovider != "linkedin")  
        {
           // Read the identity object in the user object, 
            // The identity object contains data from a specific provider (social network) 
            var identity = userinfo.user.identities[zprovider];
            // The following code demonstrates distinguishing non-targetable data from targetable data
            //  Some Facebook fields may not be used for targeting advertising: check with your implementation manager for an up to date list
            //  The following line adds targetable age data if the provider is not Facebook and the user entered their age.            
            if (zprovider != "facebook" && identity.age != "")  {
                               ccLotame.add(lotameBehavior, "Gigya^Targetable^age^" + identity.age ); 
                           }  
                   //   The following line adds non targetable age data if the provider is Facebook and the user entered their age. 
             if (zprovider == "facebook" && identity.age != "")  
                ccLotame.add(lotameBehavior, "Gigya^Non-Targetable^age^" + identity.age );                            
             // The following line adds the node Gigya-> Targetable->gender if there is gender data.
             if (identity.gender != "") 
                             {  ccLotame.add(lotameBehavior, "Gigya^Targetable^gender^" + identity.gender); }
        }    //end of  not LinkedIn
    }    //end of for loop
     //code for Lotame to deploy their "behavior collection point".
    ccLotame.bcp();
}     // end of function
</script>
</head>

<body>  
    <!-- Basic Gigya's Social Login integration -->    
    Please Login using one of the following Social Networks:    
    <div id="loginDiv"></div>    
    <script type="text/javascript">
            // register the onLogin event which when fired will call "cbUserInfo" function with the user's data.
        gigya.socialize.addEventHandlers({ onLogin: cbUserInfo });
           // display the login plugin, 
        gigya.socialize.showLoginUI({ containerID: 'loginDiv', enabledProviders: "facebook,yahoo,linkedin", showTermsLink: false, height: 50 });
        </script>
</body>
</html>