<?php echo elgg_view('footer/analytics'); $js = elgg_get_loaded_js('footer'); foreach ($js as $script) { ?> <script type="text/javascript" src="<?php echo $script; ?>"></script> <?php } ?>