Este tutorial explica paso a paso el como colocar su código de Google Analytics en su foro mybb.
Empezamos contando que ya tienes tu cuenta agregada en GA y que ya agregaste tu foro o dominio.
Vamos a
GA -> DOMINIO -> Editar -> Comprobar Estado -> (Copeas el Código)
El codigo debe ser similar a este:
Código:
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-xxxxxxxx-x']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
Ahora vamos a ACP -> Estilos y plantillas -> Plantillas -> Pie Plantillas -> footer ->
Agregas tu código asta el final, quedando algo mas o menos así:
Código:
<br />
<div class="bottommenu">
<div class="float_right">{$lang_select}</div>
<div>
<span class="smalltext"><a href="{$mybb->settings['contactlink']}">{$lang->bottomlinks_contactus}</a> | <a href="{$mybb->settings['homeurl']}">{$mybb->settings['homename']}</a> | <a href="#top">{$lang->bottomlinks_returntop}</a> | <a href="#content">{$lang->bottomlinks_returncontent}</a> | <a href="<archive_url>">{$lang->bottomlinks_litemode}</a> | <a href="{$mybb->settings['bburl']}/misc.php?action=syndication">{$lang->bottomlinks_syndication}</a></span>
</div>
</div>
</div>
<hr class="hidden" />
<div id="copyright">
<div id="debug"><debugstuff></div>
<br class="clear" />
<!-- The following piece of code allows MyBB to run scheduled tasks. DO NOT REMOVE -->{$task_image}<!-- End task image code -->
{$auto_dst_detection}
</div>
</div></div>
<!--Footer-->
<div align="center"><p class="footer">
Granime theme created by <a href="http://inu-sekai.com.ar/" title="Sama34">Sama34</a>
<!-- MyBB is free software developed and maintained by a volunteer community. It would be much appreciated by the MyBB Group if you left the full copyright and "powered by" notice intact, to show your support for MyBB. If you choose to remove or modify the copyright below, you may be refused support on the MyBB Community Forums. This is free software, support us and we'll support you. -->
<span>{$lang->powered_by} <a href="http://mybb.com/" target="_blank">MyBB{$mybbversion}</a>, © 2002-{$copy_year} <a href="http://mybb.com/" target="_blank">MyBB Group</a>.
</span><!-- End powered by -->
</p></div>
<!--/Footer-->
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-22948357-1']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
El código no es del tema default asi que puede resultar confuso, pero solo coloquen su código asta el final y no habrá problemas en ningún tema.
Espero les sirva :thumbsup: