Announcement

Collapse
No announcement yet.

Unclosed Curly Brace Expression

Collapse
X
 
  • 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."

    <head>

    <!-- Google Website Optimizer Control Script -->
    <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="'+
    'http'+(l.protocol=='https:'?'s://ssl':'://www')+'.google-analytics.com'
    +'/siteopt.js?v=1&utmxkey='+k+'&utmx='+(x?x:'')+'&utmxx='+(xx?xx:'')+'&utmxtime='
    +new Date().valueOf()+(h?'&utmxhash='+escape(h.substr(1)):'')+
    '" type="text/javascript" charset="utf-8"></sc'+'ript>')})();
    </script>
    <!-- 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') + '.google-analytics.com/ga.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
    })();
    </script>
    <!-- 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.

    <vb:comment>
    code here
    </vb:comment>
    Baby, I was born this way

    Comment


    • #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

      Comment


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

        Comment

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