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.
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
Key Events
| Event | Method |
| Login Start | onProviderLoginStart |
| Login Complete | onProviderLoginComplete |
| Login Success | onProviderLoginSuccess |
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:
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.
Omniture
Logging an event using Omniture:
s.linkTrackVars=”janrainLogin”;
s.linkTrackEvents=”None”;
s.events=”janrainLogin”;
s.tl(this,’o');
});
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.
Conclusion
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
- Enhanced Janrain Engage Analytics: The Visibility to Optimize Social Media Initiatives On Your Site
- How to Leverage Social Profile Data to Improve ROI
- Events, Customization and Client-Side Ajaxy Fun with the New Janrain Engage Social Login Widget
Janrain
Omniture
