Adding Google Analytics to Oracle OBIEE

I opened a service request to Oracle and they did not provide me an official way to add the Google Analytics javascript code to Oracle OBIEE (release 11.1.1.7): I wanted to add it in only one place and see it in all pages of Oracle Obiee.

The solution I found and tested is to add the javascript code (without <scripts> and </scripts>) in the file

bi_server1/tmp/_WL_user/analytics_11.1.1/7dezjl/war/res/b_mozilla/common.js

Pay attention that the file could be overwritten after any software upgrades