If you've installed JavaScript or other web scripting languages on your storefront, you may experience situations where completely valid, working web scripts (e.g. the JavaScript code snippet provided with Google's Analytics service) fail to perform on certain pages on your storefront.

This issue could be caused by a failure to render the code snippet properly within your store's dynamic article framework. This article will give you one potential resolution to this issue.

A Note on This Type of Error

If you are experiencing this type of script rendering failure, note that the script will appear to be fully rendered in your browser - in fact, the script will not report any error. However, the script may perform erratically (e.g. accept carriage returns from your keyboard or other types of input and render it to the actual page) or not perform at all.

Fixing the Error

Fixing this issue is quite simple, as noted in the code below:

<script> 
<!--
 if(typeof(urchinTracker)!='function'
  )
  document.write ('<sc'+'riptsrc="'+ 'http'+
   (document.location.protocol=='https:'?'s://ssl':'://www')+
   '.google-analytics.com/urchin.js'+'">
   </sc'+'ript>'
   )
//-->
</script>

<script>
<!-- _uacct = 'UA-123456-7';
urchinTracker("/1234567890/goal");
//<br/>
//-->
</script>

If you should experience this issue, simply add an HTML line break tag to the script your page is having difficulty rendering. This will force the script to properly render to the browser.

Please note that you should enter the line break tag into the script as a comment so that the tag itself will be present in the script code but not rendered to a live browser window.

Did this answer your question?