I'm building an website with Open Web Analytics.
My host is an free host and automatically insert Google Analytics.
I want remove Google Analytics because it forces to track users.
I inserted jQuery based node remove code before ga but it still gets loaded.
Like this:
<!-- Remove Google Anaylitics and include OWA. -->
<script src="js/RemoveGA.js"></script>
<script src="js/OWA.js"></script>
//RemoveGA.js
$(document).ready(function () {
$("script").each(function () {
if (this.innerHTML.length > 0) {
var googleScriptRegExp = new RegExp("var gaJsHost|var pageTracker");
if (this.innerHTML.match(googleScriptRegExp) && this.innerHTML.indexOf("innerHTML") == -1)
$(this).remove();
}
});
});
Is there any solution to achieve this?