That should work. I think it's he best if not only hook in 1.10. The code should pop up in the <head> section of every page.
I just realized one thing, having re-read my previous message. I got a bit confused, I wrote SkinEndHtmlBody, then I checked my skin to see if it triggers this event. I discovered that the skin triggers another one: SkinBeginHtmlHead.
The documentation lists this one, but not the one in your code: doc.b2evo.net/v-1-10/plugins/Plugin.html#methodSkinBeginHtmlHead
I edited the code of the plugin:
This still does no yield the desired result.]]>
Foppe, is this plugin supposed to work with the 1.10.x branch?
I am guessing that it should, as I examined the code and saw that it works by hooking to SkinEndHtmlBody, which is documented in 1.10.
I installed it, but I cannot see anything new in the HTML output after the plugin was installed (even though I can see that it is in the backend, marked as installed, and configured).
I changed the code as suggested by dejavu-cat, but I still don't see any changes.
Can you recommend a troubleshooting strategy? Or will it be easier to simply embed Google's code into the skin's main.php?]]>
You can also change the function call to
function get_google_analytics_code($google_analytics)The effect should be the same ;)
var pageTracker = _gat._getTracker("'. $id .'");
is the correct one.
I did not notice the comments was break up like that, sorry about that.]]>
Which line is correct in your above correction?]]>
I installed your plugin using latest revision (v 874) located @ sourceforge http://evocms-plugins.svn.sourceforge.net/viewvc/evocms-plugins/google_analytics_plugin/trunk/_google_analytics.plugin.php?view=markup&pathrev=874
I found the output code is not correct. So I debuged the code.
I found problematic line. here is the diff
< var pageTracker = _gat._getTracker("'. $id .'");
> var pageTracker = _gat._getTracker("<?php echo $google_analytics; ?>")
hope this help.