A number of events are fired through the Janrain login process that can be used to track login activity in your Adobe Analytics Account:
onProviderLoginToken(we are including this here to show the code but this event fires only when using client-side login)
We add handlers for each of these events in the
janrainWidgetOnload function. Adobe provides two functions you can use after the page loads to record activity:
tl(). We use
tl() because it does not cause a page view to be counted, but if you would like to count a page view for each login event,
t() works as well (keep in mind that if you attach a handler to each event you could end up counting an extra five page views per successful login). Our finished
janrainWidgetOnload function looks like this:
For each event we are calling the
submitOmnitureEvent function to which we pass the name of the event, the provider the user is attempting to log in with, and a name for the link that was clicked. The
submitOmnitureEvent function then creates a new
s object by passing the global
s_account variable in to
s_gi(), and on that
s object we set the variables we would like to track. We are tracking an event and setting a traffic variable (
prop19) and a conversion variable (
eVar19) with the name of the provider. This allows us to break down events by provider in SiteCatalyst. The
tl() function actually stands for tracklinks and can be used to track file downloads and exit links, but here we are passing it a second argument (
o) which is used when tracking custom links. The custom links setting allows us to repurpose this function to meet our needs.
SiteCatalyst allows you to create up to 100 custom events. Here we are using event1 – event6, but you can set it up using any six events you like. In order to give your events friendlier and more useful names you need to do some configuration in your SiteCatalyst account. You can find the setup for custom events by going to Admin > Admin Console > Report Suites > Edit Settings > Conversion > Success Events.
To give useful names to your traffic variable (
prop19), go to Admin > Admin Console > Report Suites > Edit Settings > Traffic > Traffic Variables.
To give useful names to your conversion variable (
eVar19), go to Admin > Admin Console > Report Suites > Edit Settings > Conversion > Conversion Variables.
Once you have configured your report suite, and log out and back in to SiteCatalyst, all these newly-named variables are displayed in your report navigation.
You can now display a report of how many times somebody has started the login process.
You can break that report down further and look at how many logins started with each provider.
<head> section runs asynchronously (it does not slow the page load).