No announcement yet.

Unclosed Curly Brace Expression

  • Filter
  • Time
  • Show
Clear All
new posts

  • [Forum] Unclosed Curly Brace Expression

    when i m trying to add google optimizer code immediately after head, it says the same "The following error occurred when attempting to evaluate this template:
    Unclosed Curly Brace Expression
    This is likely caused by a malformed conditional statement. It is highly recommended that you fix this error before continuing, but you may continue as-is if you wish."


    <!-- Google Website Optimizer Control Script -->
    function utmx_section(){}function utmx(){}
    (function(){var k='1316927452',d=document,l=d.location,c=d.cookie;function f(n){
    if(c){var i=c.indexOf(n+'=');if(i>-1){var j=c.indexOf(';',i);return escape(c.substring(i+n.
    length+1,j<0?c.length:j))}}}var x=f('__utmx'),xx=f('__utmxx'),h=l.hash;
    d.write('<sc'+'ript src="'+
    +new Date().valueOf()+(h?'&utmxhash='+escape(h.substr(1)):'')+
    '" type="text/javascript" charset="utf-8"></sc'+'ript>')})();
    <!-- End of Google Website Optimizer Control Script -->
    <!-- Google Website Optimizer Tracking Script -->
    <script type="text/javascript">
    var _gaq = _gaq || [];
    _gaq.push(['gwo._setAccount', 'UA-23774958-3']);
    _gaq.push(['gwo._trackPageview', '/1316927452/test']);
    (function() {
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
    <!-- End of Google Website Optimizer Tracking Script -->

    Please advise me which code should I fix.

  • #2
    If I remember correctly, you just need to enclose the whole code inside a vb comment.

    code here
    Baby, I was born this way


    • #3
      thanks bro but i tried to do as you said, it still comes the same. I don't know if I was rightly putting the code in "header" template. please check below screenshot.Click image for larger version

Name:	vb.JPG
Views:	1
Size:	92.5 KB
ID:	3686030


      • #4
        Put that whole thing in a .js file in your server and link to that.


        widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.