This is a migrated thread and some comments may be shown as answers.

[Solved] Google Analytics Script

2 Answers 90 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Dan Ehrmann
Top achievements
Rank 1
Dan Ehrmann asked on 30 Jul 2009, 09:55 PM
A customer pasted her Google Analytics script into the html view (along with some regular html content) and saved it. However, when opening the editor to edit the content, she got a 'permission denied' error in scriptresource.axd. The design view was empty, and she could not switch to html view. The editor content (html and javascript) was properly saved to our backend db. This occurred in IE7 and IE8. In Firefox, there was no problem.

Here is the Google code (slightly edited to remove identifiers). This was obtained directly from Google and pasted in without changes.

<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
try {
var pageTracker = _gat._getTracker("id_cide_here");
pageTracker._trackPageview();
} catch(err) {}</script>


EDIT: using version 2009.1.402.20

2 Answers, 1 is accepted

Sort by
0
Dan Ehrmann
Top achievements
Rank 1
answered on 31 Jul 2009, 03:05 PM
I believe I answered my own question. I did not have the 'EncodeScripts' content filter enabled, so the google script was running inside the editor in design view. I added the filter and the problem went away
0
Ifdev02
Top achievements
Rank 1
answered on 17 Sep 2009, 06:14 PM
What did you do with encodescript ? I have the same problem in DNN but dont know how to fix it yet
Tags
Editor
Asked by
Dan Ehrmann
Top achievements
Rank 1
Answers by
Dan Ehrmann
Top achievements
Rank 1
Ifdev02
Top achievements
Rank 1
Share this question
or