Google-Analytics-LogoIn his blog, How to Siebel?, long time consultant Jim Morse describes how to use Siebel with Google Analytics.

I have seen couple of questions regarding use of Google Analytics with Siebel CRM, but no one seems to answer completely. This article is created to answer those questions.

When it comes to web analytics there is no parallel to Google Analytics, I am not selling Google Analytics, but people who have already used GA before can understand the need of powerful web analytics tools and how Google Analytics fills the gap.

This article will give you steps to create Google Analytics account and to embed the tracking code in Siebel.

Google Analytics can be used with Siebel CRM applications for both internal like Siebel Financial Services and external customer facing applications like eService or eSales. Only requirements from Google to use tracking are:

If your application can satisfy these requirements then you can create GA code and embed it to the Siebel Application.Once it is setup one can report on user behaviour demographic and many more metrics in GA.

I have used GA's Universal Analytics(newer version of GA) and created custom dimensions to store Active View Name, Application Name and Login User on Google.

Slide 1

Slide 2

Slide 3

 

Additionally I created events to capture the user interaction application. You can create event to business specific needs like: product configurator or service request creation or tasks.

How to embed Google Analytics tracker in Siebel Open UI?

Add the following code in postload.js file under the public directory, this code will be executed always when ever view is refreshed in Open UI. Code shown in bold is added after creation of dimension shown above.

(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) })(window,document,'script','//www.google-analytics.com/analytics.js','ga'); ga('create', 'YOUR_CODE', 'yoursitename'); ga('send', 'pageview'); ga('set', 'dimension2', theApplication().GetProfileAttr("Login Name")); ga('set', 'dimension1', theApplication().GetProfileAttr("ActiveViewName")); ga('set', 'dimension3', theApplication().GetProfileAttr("ApplicationName")); ga('send', 'event', theApplication().GetProfileAttr("ActiveViewName"), 'click', theApplication().GetProfileAttr("Login Name"));

How to embed Google Analytics with Siebel HI?

Add following code to the swecommon.js for high interactive applications, this js is also executed allways after page refresh in HI applications.

(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) })(window,document,'script','//www.google-analytics.com/analytics.js','ga'); ga('create', 'YOURCODE', 'yoursitename'); ga('send', 'pageview'); ga('set', 'dimension2', theApplication().GetProfileAttr("Login Name")); ga('set', 'dimension1', theApplication().GetProfileAttr("ActiveViewName")); ga('set', 'dimension3', theApplication().GetProfileAttr("ApplicationName")); ga('send', 'event', theApplication().GetProfileAttr("ActiveViewName"), 'click', theApplication().GetProfileAttr("Login Name"));

Caution : Do not track customer information such as user details using custom dimesions and metrics as it is against the google analytics policy and could be against the organisation policy as well.

After all this is done you would be able to see the analytics information in your google account.

Google_Analytics_in_Siebel-4

Google_Analytics_with_Siebel-5

Real_Time_Analytics_for_siebel-6

Now you can do full fledged analytics on your user interactions. My favorite is real time analytics, which one is your favorite?

Happy Analytics :)

Used with permission. This post originally appeared on the How to Siebel? blog.