Hello.
I've many html pages on my site, every page has the next script for visits tracking and works perfectly.
Quote:
<!-- Start of Google 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-7942097-2");
pageTracker._trackPageview();
} catch(err) {}</script>
<!-- End of Google Code -->
</body>
</html>
I want put this script in PHP modules which generate final main page of Gallery.
I did this procedure with simple guestbook PHP templates and all is OK.
But in Gallery 2 is very difficult to find needed *.php for it.
Can you help me with this problem?
Because main.php doesn't contain </body> inside itself, it create page from other modules, as I understand.
Quote:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html lang="en-US" xmlns="http://www.w3.org/1999/xhtml">
<head>
<link rel="stylesheet" type="text/css" href="main.php?g2_view=imageframe.CSS&g2_frames=gold%7Cgold2"/>
<link rel="stylesheet" type="text/css" href="modules/core/data/gallery.css"/>
<link rel="stylesheet" type="text/css" href="modules/icons/iconpacks/silk/icons.css"/>
<link rel="stylesheet" type="text/css" href="modules/colorpack/packs/black/color.css"/>
................................................
</div>
</td>
</tr>
</table>
<div id="gsFooter">
<a href="http://gallery.sourceforge.net"><img src="images/gallery.gif" alt="Powered by Gallery v2.3" title="Powered by Gallery v2.3" style="border-style: none" width="80" height="15"/></a>
</div>
</div>
<script type="text/javascript">
// <![CDATA[
search_SearchBlock_init('Search the Gallery', 'Please enter a search term.', 'Searching in progress, please wait!');
// ]]>
</script>
</body>
</html>
With best regards, Alexandr.
Posts: 25965
http://codex.gallery2.org/Gallery2:How_To_Add_Google_Analytics_to_my_Gallery_2
Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team
Posts: 2
Thank You very much for help!!!