Recent Topics

1 Feb 20, 2009 09:55    

My b2evolution Version: Not Entered

I know this has probably been asked before and i have searched the forums and cannot find an answer.

here is my problem
I downloaded and installed the analytics plugin no problems and changed my UA code i did this some time ago about a week and got no stats for my blogs in google analyics.

on checking the produced source in my browser i found that the code was not being embedded.

I am using a heavily modded zimple_zen template

this is at the end of my index.main.php


<?php
// ------------------------- HTML FOOTER INCLUDED HERE --------------------------
skin_include( '_html_footer.inc.php' );
// Note: You can customize the default HTML footer by copying the
// _html_footer.inc.php file into the current skin folder.
// ------------------------------- END OF FOOTER --------------------------------
?>

this is at the end of my page.main.php


<?php
// ------------------------- HTML FOOTER INCLUDED HERE --------------------------
skin_include( '_html_footer.inc.php' );
// Note: You can customize the default HTML footer by copying the
// _html_footer.inc.php file into the current skin folder.
// ------------------------------- END OF FOOTER --------------------------------
?>

This is my _html_footer.inc.php


<?php
/**
 * This is the HTML footer include template.
 *
 * For a quick explanation of b2evo 2.0 skins, please start here:
 * {@link http://manual.b2evolution.net/Skins_2.0}
 *
 * This is meant to be included in a page template.
 * Note: This is also included in the popup: do not include site navigation!
 *
 * @package evoskins
 */
if( !defined('EVO_MAIN_INIT') ) die( 'Please, do not access this page directly.' );


// Trigger plugin event, which could be used e.g. by a google_analytics plugin to add the javascript snippet here:
$Plugins->trigger_event('SkinEndHtmlBody');

$Hit->log();	// log the hit on this page
debug_info(); // output debug info if requested
?>

    <div id="bottom-cap"></div>

</div>

</body>
</html>

Hope someone can help its not the end of the world but its annoying me now

Thanks

Macman73

Sorry the link is

http://www.goalchallenge.co.uk/blog

2 Feb 20, 2009 13:00

This is what your skin should end with:

</script>
	<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">
	var pageTracker = _gat._getTracker("UA-2640722-2");
	pageTracker._initData();
	pageTracker._trackPageview();
	</script>
		
<!-- End of skin_wrapper -->
</div>

</body>
</html>


However I see nothing of that in your skin:

</div>


    <div id="bottom-cap"></div>

</div>

</body>
</html>


Have a look at the file _posts.inc.php. That's the file that generates the main page. You're looking for the correct codesnippets.

skin_include( '_html_footer.inc.php' ); 

Good luck

3 Feb 20, 2009 16:15

Thanks for the reply i manually added my tracking code into the footer file it now reads

<?php
/**
 * This is the HTML footer include template.
 *
 * For a quick explanation of b2evo 2.0 skins, please start here:
 * {@link http://manual.b2evolution.net/Skins_2.0}
 *
 * This is meant to be included in a page template.
 * Note: This is also included in the popup: do not include site navigation!
 *
 * @package evoskins
 */
if( !defined('EVO_MAIN_INIT') ) die( 'Please, do not access this page directly.' );


// Trigger plugin event, which could be used e.g. by a google_analytics plugin to add the javascript snippet here:
$Plugins->trigger_event('SkinEndHtmlBody');

$Hit->log();	// log the hit on this page
debug_info(); // output debug info if requested
?>

    <div id="bottom-cap"></div>

</div>

<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">
var pageTracker = _gat._getTracker("UA-4016481-1");
pageTracker._trackPageview();
</script>

</body>
</html>

I wasn't aware that i had to do this i thought the plugin once installed did all the work i am no expert you see.

my tracking code is now being displayed when i view the source from my web browser i will wait 24hours and see what happens

Thanks again

Just one thing can you tell me what the function of the plugin is if i have to manually insert my tracking code in the footer anyway

Just interested


Form is loading...