Monday, 11 May 2015

Enabling Basic Google Analytics for JD Edwards EnterpriseOne 9.1.5

If you're comfortable with Google knowing how you use your ERP then here is a simple way to enable the Google Analytics engine for your JDE EnterpriseOne instance. These instructions are for the 9.1.5 tools but could just as easily be adapted to the older tools releases.

So the first thing you need is a Google Analytics account. There's plenty of information available on how to go about it so I'm not going to clutter the internet with yet another tutorial. If you need a starting point, here's Google's documentation.

To activate the data capture for Google Analytics you need to include some javascript. The best place I have found to inject this code at the moment is in the webgui.js file. Simply append the following code to the very end of the file:

    (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', 'UA-XXXXXXXX-X', {"siteSpeedSampleRate": 100});
    ga('send', 'pageview');


You'll need to replace UA-XXXXXXXX-X with your own Google Analytics identifier.

Where is the webgui.js file you might ask... Assuming you're using Server Manager (I don't who isn't) then you'll want to update the deployment package found in the SCFHA folder on your JDE web server. Here's an example linux path you might use for you PY deployment:
/u01/jde_home/SCFHA/targets/WL_JPY910/owl_deployment/webclient.ear/app/webclient.war/share/js/webgui.js

That's it. If you restart your web instance the solution will redeploy with the new updated js file and you'll be away. Depending on your browser cache you may need to hit refresh to ensure the latest webgui.js is pulled down onto your client machine. You should then be able to log in to Google Analytics and watch the hits flow through as you navigate through the JDE applications.

Please be aware that this has not been heavily tested and is not supported by Oracle so if you do implement this change you do so at your own risk.



3 comments: