3rd-party Analytics Integration

Skip to end of metadata
Go to start of metadata

 

Introduction

If you are already tracking your website’s traffic with a third-party analytics platform such as Google Analytics Adobe Analytics (formerly Omniture SiteCatalyst or Genesis), WebtrendsKissMetrics or other, this guide will show you how to easily include additional data from Gigya's social events. This will give you the ability to analyze the usage of Social Login and other social activities, such as sharing and commenting, on your site. More importantly, you will be able to see how those social actions are impacting the Key Performance Indicators (KPIs) you are already tracking (e.g., are socially logged-in users more likely to purchase than non-social users?).

Tying Gigya into your third-party analytics will also give you the granularity of social interaction reporting down to the individual URL (i.e., piece of content or product level), so you can see all-time and historical comparison views of top shared content, for example.

Gigya offers a plug & play analytics integration solution for Google Analytics and Google Universal Analytics, as well as for Adobe Analytics.

In addition, Gigya offers a simple code integration for any third-party analytics platform. Read more in the Tracking Social Events section below, the section includes comprehensive code examples.

Google Analytics

Gigya provides a plug & play solution for Google Analytics and Google Universal Analytics. Integrating either solution is simple, all you have to do is load the gigyaGAIntegration.js library in the relevant pages.

Add the following line to the <HEAD> section of each page that you would like to include in your analytics:

<script type="text/javascript" src="http://cdn.gigya.com/js/gigyaGAIntegration.js" >

When using The Gigya Web SDK over HTTPS it is important that the script tag in the head references the https version of the SDK, (note CDNS as opposed to CDN) e.g.,

<script type="text/javascript" src="https://cdns.gigya.com/js/gigyaGAIntegration.js"></script>

Notes:

  1. This section is based on the assumption that you already have a basic working Google Analytics integration, and want to add social events tracking.
  2. The integration with Google Analytics will not include historical data, only new data obtained after the integration is set up.

The Default Tracking Behavior

Gigya's plug & play solution has a default configuration, specifying which Gigya events will be tracked and how. Google analytics defines two methods to track social events: _trackSocial and _trackEvent. Gigya's default configuration maps the social events to the Google tracking methods as specified below:

_trackSocial

The Gigya events that are mapped to the _trackSocial method are: onSendDone, onFollowClicked. 

You will find the analytics of these events in the following section of your Google Analytics standard reports:

The following table specifies, per Gigya event, the data that we pass to the _trackSocial method:

Gigya Eventnetwork parametersocialAction parameter opt_target parameteropt_pagePath parameter
onSendDone
(triggered by the sharing related plugins: socialize.showShareUIsocialize.showShareBarUI,
socialize.showReactionsBarUIgm.showNotifications)
Provider 
(Note: If there is more than one provider, _trackSocial is called for each provider separately.)
"Gigya " + [plugin method name] + " - Share Published"
(e.g. "Gigya showShareUI - Share Published")
The current page URLNA
onFollowClicked
(triggered by socialize.showFollowBarUI)
Provider"Gigya Follow - button clicked"The current page URLNA

_trackEvent

The Gigya events that are mapped to the _trackEvent method are: onReactionClicked, onReactionUnclicked, onCommentSubmitted, onCommentVoted, onLoginonLogoutonConnectionAddedonConnectionRemoved.
You will find the analytics of these events in the following section of your Google Analytics standard reports:

The following table specifies, per Gigya event, the data that we pass to the _trackEvent method:

Gigya Eventcategory parameteraction parameteropt_label parameter
onReactionClicked 
(triggered by socialize.showReactionsBarUI)
"Gigya Reaction Bar""Button Clicked"Reaction text
onReactionUnClicked 
(triggered by socialize.showReactionsBarUI)
"Gigya Reaction Bar""Button UnClicked"Reaction text
onCommentSubmitted
(triggered by comments.showCommentsUI )
"Gigya Comments" / "Gigya Reviews"
(Defined according to the value of the event's "mode" field which can be either "comments" or "reviews")
"Comment Published" / "Review Published"Comments streamID
onCommentVoted
(triggered by comments.showCommentsUI  )
"Gigya Comments" / "Gigya Reviews""Comment Voted" / "Review voted"Comments streamID
onLogin
(triggered by socialize.loginsocialize.showLoginUI and various plugins)
Login source name(e.g. "Gigya Login UI", "Gigya Comments", "Gigya Login API", etc.) "Social Login"Provider
onLogout
(triggered by socialize.logout and various plugins)
Logout source name"Logout"Provider
onConnectionAdded
(triggered by socialize.addConnection
socialize.showAddConnectionsUI and various plugins)
Connect source name(e.g. "Gigya Add Connection UI", "Gigya Comments", "Gigya Add Connection API", etc.) "Social Connection Added"Provider

onConnectionRemoved
(triggered by socialize.removeConnection
socialize.showAddConnectionsUI  and various plugins)

Remove connection source name"Social Connection Removed"Provider

Overriding the Default Behavior

Gigya defines an "Event Map", defining which Gigya events will be tracked and how. The default "Event Map" specifies the mapping that is elaborated in the tables above. You may override (or add to) the default "Event Map" by setting the customEventMap parameter of the Global Configuration. Learn more in Overriding the Default Event Map. You may also track events manually, as described in the Tracking Social Events section below. 

Live Example

For a live example, check out our live Demo Site and refer to the Demo Site Implementation Guide.

The demo site uses Google Analytics for tracking page view and social events. The site includes implementation of Gigya's Social Login and several of Gigya's plugins: Share Bar pluginReactions pluginComments plugin, and more. The events that are triggered by these plugins are reported to Google Analytics.

Adobe Analytics

If you are working with Adobe analytics (formerly Omniture, SiteCatalyst and Genesis), use  Custom Link Tracking  to track social events. To do so, first register to the Gigya event that you would like to track. In the event handler method apply the  Custom Link Tracking  code to report the event to Adobe Analytics. See the following code example:

// Register to Gigya's onLogin event
gigya.socialize.addEventHandlers({ 
        onLogin: trackLoginEvent  // call trackLoginEvent when Social Login finishes successfully
    }
);

// trackLoginEvent - event handler
function trackLoginEvent(event) {
	var action = event.eventName + ": " +  event.provider;

        // Report the event to Omniture - the "Custom Link Tracking" code:
          s.linkTrackVars="eVarN,events"; 
          s.linkTrackEvents="eventN"; 
          s.events="eventN"; 
          s.eVarN=action; 
          s.tl(this,'o', action);
}

You may find more code examples in the Tracking Social Events section below.

See also the Adobe documentation for the Genisis Integration guide PDF.

Plug & Play Solution for Adobe Analytics Platform

Gigya has partnered with Adobe Analytics (formerly Adobe Genesis) to provide comprehensive social analytics and reporting for Adobe customers. With this integration, Adobe customers can access social analytics that provide metrics on customers’ social profiles and social interactions.

Gigya - Adobe Analytics Integration Configuration

 

For more information please contact your Gigya Client Services Manager.

Tracking Social Events

Gigya's Web SDK fires events to which you can listen, and reports these events to your analytics provider. Please refer to the Events guide, which shows how to handle events generated by Gigya.

How to Track User Login Events

Gigya generates the following global events: onLoginonLogout,  onConnectionAdded, and onConnectionRemoved

Register to the events that you would like to track. In the event handler method report the event to your analytics provider:

 

Adobe Analytics

// Register to Gigya's onLogin event
gigya.socialize.addEventHandlers({ 
        onLogin: trackLoginEvent  // call trackLoginEvent when Social Login finishes successfully
    }
);

// trackLoginEvent - event handler
function trackLoginEvent(event) {
	var action = event.eventName + ": " +  event.provider;

        // Report the event to Omniture - the "Custom Link Tracking" code:
        s.linkTrackVars="eVarN,events"; 
        s.linkTrackEvents="eventN"; 
        s.events="eventN"; 
        s.eVarN=action; 
        s.tl(this,'o', action);
}

 

 

Invalid License

License is not configured.

How to Track Sharing Events

Share Bar

The Share Bar plugin generates the following events:

  • onSendDone - when the sharing process completes successfully.

Register to the events that you would like to track. In the event handler method report the event to your analytics provider:

Invalid License

License is not configured.

Share

The Share plugin generates the following events:

  • onLoad - when a share plugin appears on screen.
  • onSendDone - when the sharing process completes successfully.

Register to the events that you would like to track. In the event handler method report the event to your analytics provider:

Invalid License

License is not configured.

How to Track Reaction Events

The Reactions plugin generates the following events:

  • onReactionClicked, onReactionUnclicked - when a reaction button is clicked/unclicked.
  • onSendDone - when the sharing process completes successfully.

Register to the events that you would like to track. In the event handler method report the event to your analytics provider:

Invalid License

License is not configured.

How to Track Comments Events

The Comments plugin generates the following events:

Register to the events that you would like to track. In the event handler method report the event to your analytics provider:

Invalid License

License is not configured.