Skip to main content
IAM vs. CIAM CIAM Buyer's Guide Contact Us
Janrain respects your privacy and will treat the personal data you choose to share with us in accordance with our privacy policy.

Analytics Integrations with the Social Login Widget

By Larry Drebes | Posted on October 26, 2011

Blog Banner

This is the fourth in a series of blog posts by Kevin Long, Janrain Technical Product Manager, to introduce the new Janrain Engage social login widget and provide detail on how to use the new enhancements. Read other posts within the Janrain Technical series.

Previous posts covered the expanded support for mobile devices, new customization features, and performance. Today we’ll focus on using the client side javascript api and how to connect it to analytics engines.

​​widget analytics

The Event of the Season!

Analytics Integration with the Social Login Widget

Janrain Engage analytics provide a lot of insight and value with the hand dashboard trend graph, summaries and the click to drill in headings that reveal the details. If you are already tracking your website’s visitor traffic with an analytics tool like Google Analytics, or Omniture SiteCatalyst you will want to view the user login process right along side your existing analytics data.

The Janrain Engage social login widget’s client side JavaScript API fires events that you can listen to and trigger your own client side code. You can track these events using a product like Google Analytics or Omniture, or even your own in house analytics.

How to Track User Login Events

One way is to use the Janrain Engage advanced social login widget’s client-side JavaScript API. This API allows you to record fine-grained data for social analytics based on client-side events triggered by user actions.

Key Events

Login StartonProviderLoginStart
Login CompleteonProviderLoginComplete
Login SuccessonProviderLoginSuccess

Code Examples

These examples assume that you already have a working analytics integration and are looking for a way to include additional data from Janrain Engage social login widget.

Google Analytics

Calls to google analytics are made in the following form:

_trackEvent(category, action, opt_label, opt_value)

Example of logging an event using Google Analytics and Janrain Engage: {
   _trackEvent(‘Login’, ‘loginComplete’, ‘providerName’, response.provider);

See links at the end of this document for further reading on Google link tracking.


Logging an event using Omniture: {


See links at the end of this document for further reading on Omniture custom link tracking.

Other Vendors

Examples of client side JavaScript event handling for other vendors like Webtrends can be found in each vendor’s documentation; look for the keywords JavaScript and Event to find their examples.


We learned that the Janrain Engage Social Login Widget’s events can fuel any analytics engine, be it your own or any of the industry standards.

We’ve shown you one way to do it, but you may be interested in additional techniques and scenarios. Resources for further study are included below or you can contact a Janrain representative who can work with you and your specific needs.

Resources for Further Reading

Blog Posts


Janrain Events Documentation


Google’s Event Tracking Guide


Popular Posts

About the author

Larry Drebes

Larry Drebes


Larry founded Janrain in 2005 to address the challenge of managing user identity on the Internet. In its early days, Janrain drove the development of the majority of the open source OpenID protocol libraries that continue to be used today by organizations such as Google and Yahoo!, and was a founding member of the OpenID Foundation, a nonprofit governance organization for the industry. Prior to Janrain, Larry was a co-founder of Silicon Valley startups, a web-based service, and Four11 Corporation. At Four11 Corporation, Larry led the development of its RocketMail product, one of the first Internet-based email systems. Four11 was acquired by Yahoo! in 1997, and its RocketMail product became Yahoo! Mail. Earlier in his career, Larry did software development for Raynet, McDonnell Douglas and A.G. Edwards.

View all posts by Larry Drebes