MyBB Community Forums

Full Version: Google Analytics
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I am not sure. Although Google tells me I have the code properly installed I am not getting data ..but it says it is collecting.
Where would I place the snipit code for this? I have placed it on the index page since all the forums work from there correct?
Should I add it to the headerinclude or where?
Thank you...Huh
Try the header include template, i put it there and it works great.
You should add it at the bottom of the footer template. It can take a while for google analytics to start showing information.

In response to JonP, they say to include it at the bottom of your page so that it is loaded after your other content to avoid delays to your visitors while viewing content.
Oh Okay ... I will move it.. I tried it in the header include..and it messed up my entire page..I had to reinstall the template.
When I checked the way google told me to by going to the site and view page source it does show where it should.
However I think I will move it to the footer page.. Thank you.
Or you could use a plugin which makes the all work for you: http://mods.mybboard.net/view/google-analytics
(2010-02-05, 01:56 PM)querschlaeger Wrote: [ -> ]Or you could use a plugin which makes the all work for you: http://mods.mybboard.net/view/google-analytics

Dear Querschläger!

I was wondering whether your google analytics plugin update from Feb 4th, 2010 incorporated the new google analytics asynchronous snippet?
If so, please let me know, thanks

Follow up: I opened your plugin in an editor and it seems like you used the standard snippet for your plugin. Apparently, it loads faster and hence it can be put on top of the page. That way absolutely all activity should be monitored. Now I was wondering whether you think one could use this new snippet with your plugin. I tried to substitute the old snippet with the following but that does not work Sad.

<script type="text/javascript">

var _gaq = _gaq || [];
_gaq.push(['_setAccount', '.$mybb->settings['ganalytics_webpropertyid'].']);
_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';
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(ga);
})();

</script>

What do you think?


(2010-02-04, 07:12 AM)TimB. Wrote: [ -> ]You should add it at the bottom of the footer template. It can take a while for google analytics to start showing information.

In response to JonP, they say to include it at the bottom of your page so that it is loaded after your other content to avoid delays to your visitors while viewing content.

According to Google, the new asynchronous snippet can be located higher in the page. In fact, they suggest the following: "Insert the asynchronous snippet at the top of the <body> section of your pages, after the opening <body> tag."
What I ended up doing was placing the code snipit in the footer of the default template and it is running very smoothly for me. I had it in the header but to put it in the footer seemed to work much faster with working readings for me.
(2010-02-05, 01:56 PM)querschlaeger Wrote: [ -> ]Or you could use a plugin which makes the all work for you: http://mods.mybboard.net/view/google-analytics

This doesnt track downloads and outbound links and everythig that analytics lets you do does it ?
Take a look at google analytics. They have a lot there and there is a lot to learn. They do not support warez though so hjertelandetdk since I do not have a warez site I did not look into that. What I need tracked is working great and I am pleased with that along with google SEO Smile
(2010-02-05, 01:56 PM)querschlaeger Wrote: [ -> ]Or you could use a plugin which makes the all work for you: http://mods.mybboard.net/view/google-analytics

Hi Querschläger,

I saw that your plugin was updated on April 23. Did you just add the asynchronous google analytics to your plugin? Or did you make any other changes?

Thanks