nick8701 Posted January 18, 2009 Share Posted January 18, 2009 (edited) Hi everyone, Im trying to integrate google analytics into my site but when i add the code in: <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("MY TRACKER NUMBER"); pageTracker._trackPageview(); } catch(err) {}</script> But i see this error on the whmcs page: Fatal error: Smarty error: [in portal/footer.tpl line 13]: syntax error: unrecognized tag 'var' (Smarty_Compiler.class.php, line 583) in /home/USER NAME/public_html/whmcs/libs/Smarty.class.php on line 1095 In the google site they say: If your site has dynamic content, you can use a common include or a template. I dont know what this means or how i can make it work with whmcs. Help much appreciated Nick Edited January 18, 2009 by nick8701 spelling 0 Quote Link to comment Share on other sites More sharing options...
bear Posted January 18, 2009 Share Posted January 18, 2009 Have you read the docs? {literal} <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("MY TRACKER NUMBER"); pageTracker._trackPageview(); } catch(err) {}</script> {/literal} 0 Quote Link to comment Share on other sites More sharing options...
nick8701 Posted January 18, 2009 Author Share Posted January 18, 2009 Thanks for the fix bear. Id just like to say that the support on the whmcs forums is fantastic and you all are doing a great job supporting us n00bs. So im gratefull for your quick response and helpfull support. 0 Quote Link to comment Share on other sites More sharing options...
bear Posted January 18, 2009 Share Posted January 18, 2009 You're welcome. Bear in mind, 99.9% of the folks helping you on this forum are simply users of WHMCS like yourself. They do a great job in helping others out of the goodness of their hearts, and deserve a LOT of credit. 0 Quote Link to comment Share on other sites More sharing options...
merlinpa1969 Posted January 20, 2009 Share Posted January 20, 2009 Hey Bear, you got any magic answers about the commerce conversition, for some reason I cant seem to get it to work 0 Quote Link to comment Share on other sites More sharing options...
bear Posted January 20, 2009 Share Posted January 20, 2009 No idea what you're referring to. 0 Quote Link to comment Share on other sites More sharing options...
merlinpa1969 Posted January 20, 2009 Share Posted January 20, 2009 never mind its part of the google analytics, you can actually track your sales conversion rate 0 Quote Link to comment Share on other sites More sharing options...
nick8701 Posted January 20, 2009 Author Share Posted January 20, 2009 I think your reffering to goals???, if so u can set it up in google analytics and if they reach the payment paid page then you can make that as a goal, and then u can track that in google analytics?? 0 Quote Link to comment Share on other sites More sharing options...
merlinpa1969 Posted January 20, 2009 Share Posted January 20, 2009 actually no im not talking about goals, but it dosnt matter, I will figure it out.... 0 Quote Link to comment Share on other sites More sharing options...
Shaun Posted January 21, 2009 Share Posted January 21, 2009 merlinpa. I have tried to user the ecommerce as well with no luck. I think my issue could be that im using another domain. There is a post on the forum about how to use the track transaction functions. 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.