Results 1 to 2 of 2

Thread: Google Analytics code generates error

  1. #1
    Join Date
    Nov 2008
    Posts
    4

    Default Google Analytics code generates error

    Whem I'm inserting the analytics code in the footer, I have the following error:
    Fatal error: Smarty error: [in default/footer.tpl line 74]: syntax error: unrecognized tag 'var' (Smarty_Compiler.class.php, line 583) in /home/hostwasp/public_html/orders/libs/Smarty.class.php on line 1095

    This is the look of the Analytics code:

    Code:
    <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("UA-XXXXX-XX");
    pageTracker._trackPageview();
    } catch(err) {}</script>

  2. #2
    Join Date
    Aug 2008
    Location
    Brisbane, Austalia
    Posts
    495

    Default

    A) This isn't a bug report, its a user error sorry bud.
    b) You can't insert straight html into smarty templates withought wrapping it in {literal} {/literal} tags.
    Shaun - Kadeo
    WHMCS Modules || Custom WHMCS Mods/Development || Systems Development