Gigya Job Openings

Google Analytics Integration

Skip to end of metadata
Go to start of metadata



Gigya provides a Plug & Play solution for Google Analytics and Google Universal Analytics. If you have a basic working Google Analytics integration, and want to add social events tracking, just load the gigyaGAIntegration.js library in the relevant pages in your website.

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="" >

The Gigya Google Analytics Integration must be loaded after the actual Google Analytics code snippet, e.g.,

	(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),

	ga('create', 'UA-XXXXXXXXXX-Y', 'auto'); // Your unique UA key goes here
	ga('send', 'pageview');
<script type="text/javascript" src=""></script>

Note that the line above has to appear after Google Analytics, Universal Analytics and/or Google Tag Manager are loaded in the page. The Gigya integration code depends on the general Google Analytics code and may not function properly if the correct loading order is not maintained.

In addition, Gigya's GA integration only works with Google default trackers. It will not work with Google named trackers. For example:


Default Tracker

ga('create', 'UA-xxxxx-y', 'auto');

Named Tracker

ga('create', 'UA-xxxxx-y', 'auto', 'myTracker');

Unable to render {include} The included page could not be found.

Watch an Instructional Video

To watch a video about this subject, you can visit our Enablement portal with your approved SAP customer or partner ID (S user). Please visit the About page to find out how to get an S user.

The Default Tracking Behavior

Gigya's plug & play solution has a default configuration, specifying which Gigya events will be tracked and how. Depending on which version of Google analytics you are using (Universal, or Non-Universal) varying methods are defined for tracking social interactions and other events: For Non-Universal analytics: the _trackSocial and _trackEvent methods; for Universal analytics, there is a single Send method that takes a hitType of social or event. Gigya's default configuration maps the social events to the Google tracking methods as specified below:

Tracking Social Interactions

The Gigya events that are mapped to the _trackSocial method or social hitType 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 EventTriggered Bynetwork parametersocialAction parameteropt_target parameteropt_pagePath parameter


The sharing related plugins: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
onFollowClickedsocialize.showFollowBarUIProvider"Gigya Follow - button clicked"The current page URLNA

Tracking Other Events

The Gigya events that are mapped to the _trackEvent method or event hitType are: onReactionClicked, onReactionUnclicked, onCommentSubmitted, onCommentVoted, onLogin, onLogout, onConnectionAdded, onConnectionRemoved.
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 EventTriggered Bycategory Parameteraction Parameteropt_label Parameter
onReactionClicked socialize.showReactionsBarUI"Gigya Reaction Bar""Button Clicked"Reaction text
onReactionUnClicked socialize.showReactionsBarUI"Gigya Reaction Bar""Button UnClicked"Reaction text
onCommentSubmittedcomments.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
onCommentVotedcomments.showCommentsUI"Gigya Comments" / "Gigya Reviews""Comment Voted" / "Review voted"Comments streamID



various plugins


Login source name
(e.g. "Gigya Login UI", "Gigya Comments", "Gigya Login API", etc.) 
"Social Login"Provider


various plugins

Logout source name"Logout"Provider




various plugins

Connect source name
(e.g. "Gigya Add Connection UI", "Gigya Comments", "Gigya Add Connection API", etc.) 
"Social Connection Added"Provider




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 Conf object. 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

Please 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.

Google Tag Manager

What is Google Tag Manager?

Google Tag Manager extends the functionality of Google's Universal Analytics by enabling the ability to track a virtually unlimited number of unique events on the pages of your website by assigning tags to the relevant pages. Google Tag Manager is not a replacement for Google Analytics, and is used in conjunction with it. When events are triggered using Google Tag Manager, you are then able to track them as you would any other events inside your existing Google Analytics Dashboard. Additionally, once you create the tag and add the relevant script to your website, you are then able to dynamically edit the events for the tag directly from within the GTM Dashboard without needing to update your site's code. For more information, see the Google Tag Manager events documentation.

The license could not be verified: License Certificate has expired!

Tracking Social Events

Gigya's Web SDK fires events to which you can catch and pass on to Google Analytics. Please refer to the Events guide, which shows how to handle events generated by Gigya.

For sample code showing how to track several events, please refer to Tracking Social Events.