According to the GA docs, the asynch GA script runs best when it's right before the </head> tag. I had tried putting it in my templates using a regular macro, but if any other macros use the umbraco.library:RegisterClientScriptBlock command, it's possible that the GA script will not be the last script, since these append before the </head> tag.
So my question is, does this plug-in always inject the code before </head>, or would umbraco.library:RegisterClientScriptBlock in other macros cause it to be bumped up?
My feeling is that you are correct, that the Umbraco.library:ReigsterClientScriptBlock would push it up. There may be a small performance hit if it's not the last item, but it should still work properly.
I'd be interested to hear what others have to say though.
Does this inject before </head> tag?
According to the GA docs, the asynch GA script runs best when it's right before the </head> tag. I had tried putting it in my templates using a regular macro, but if any other macros use the umbraco.library:RegisterClientScriptBlock command, it's possible that the GA script will not be the last script, since these append before the </head> tag.
So my question is, does this plug-in always inject the code before </head>, or would umbraco.library:RegisterClientScriptBlock in other macros cause it to be bumped up?
My feeling is that you are correct, that the Umbraco.library:ReigsterClientScriptBlock would push it up. There may be a small performance hit if it's not the last item, but it should still work properly.
I'd be interested to hear what others have to say though.
is working on a reply...