Developer forum

Forum » Dynamicweb 9.0 Upgrade issues » How to disable the Analytic script in DW9?

How to disable the Analytic script in DW9?

Jakob Kristensen
Reply

Hi Guys,
Anyone knows how to disable the Analytics script in the Admin site in DW9?
The script looks like the below:

<script type="text/javascript">
(function(w,d,n) {
w[n]=w[n]||function(name,value){ w[n][name]=value; };
var dwa = d.createElement('script'); dwa.type = 'text/javascript'; dwa.async = 1;
dwa.src = '/Admin/Content/JsLib/dw/dwansta.min.js';
var s = d.getElementsByTagName('script')[0]; s.parentNode.insertBefore(dwa, s);
})(window,document,'analytics');

analytics('sessionID', '2u5qw3ndhx5q1g0o4fdrtx3g');
analytics('pageID', 55);
analytics('areaID', 1);
analytics('engagement', 18);
</script>


Thanks
Jakob

 


Replies

 
Nicolai Pedersen
Reply
This post has been marked as an answer

Hi Jakob

There is no UI for it for some reason. But you can go directly to the globalsettings and disable it, see dump.

If you just want one page to not track anything, i.e. a json feed, you can just set the response content type on a pages properties, see dump 2. That will disable stat js for that page.

BR Nicolai

Capture.PNG Capture1.PNG
Votes for this answer: 1

 

You must be logged in to post in the forum