Wednesday 28 April 2010 2:23:45 am
How do I get Google Analytics to work? I have pasted those two javascript codes in both “pagelayout.tpl” and in “page_footer_script.tpl”, but the javascript gets cut of after “try” which is just before the pagetracker code. This happens in both templates. You can see it at fabrikken.org Is it easier to get Analytics to work by using the BC website Statistc extension? here is my page_footer_script.tpl {if $pagedesign.data_map.footer_script.has_content}<script language="javascript" type="text/javascript"><!--
{$pagedesign.data_map.footer_script.content}
--></script>{/if}{* Override this template and place javascript based statestics here (like Google Analytics) *}
<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{<span> </span>var pageTracker = _gat._getTracker("UA-15751810-1");pageTracker._trackPageview();} catch(err) {}</script>{if $pagedesign.data_map.footer_script.has_content}<script language="javascript" type="text/javascript"><!--
{$pagedesign.data_map.footer_script.content}
--></script>{/if}{* Override this template and place javascript based statestics here (like Google Analytics) *}
<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{<span> </span>var pageTracker = _gat._getTracker("UA-15751810-1");pageTracker._trackPageview();} catch(err) {}</script>
Erland Flaten
Lilllehammer, Norway
|