I was wondering if there was some ulterior reason for the Google Analytics code (in serendipity_event_google_analytics by kleinerChemiker) being placed at towards the top of the page rather than at the bottom?
I am not 100%, but I think that this will cause some (don't ask which :p ) browsers to run this code before displaying the rest of the page. Google says:
I have made a minor change to put this code at the bottom if people think that this is a good idea - but if there was a particular reason behind this decision then that is fine.Copy the following code block into every web page you want to track, immediately before the </body> tag.
The (teeny tiny) patch is:
Code: Select all
serendipity_event_google_analytics.php
34c34
< $propbag->add('event_hooks', array('frontend_header' => true, 'frontend_display' => true));
---
> $propbag->add('event_hooks', array('frontend_footer' => true, 'frontend_display' => true));
235c235
< case 'frontend_header':
---
> case 'frontend_footer':
Best,