Support » Plugin: Cookie Control » [Plugin: Cookie Control] Positioning of Google Analytics Code

  • The plugin positions the Google Analytics code just before the closing body statement. According to Google the code should be placed just before the closing head statement.

    Does this matter? The reason I ask is that data does not appear to have been collected for the past few days, i.e., since I installed the plugin.

Viewing 3 replies - 1 through 3 (of 3 total)
  • You don’t need a plugin. Deactive the google plugin then click on “Appearance > Editor > select the file “header.php” in the far right column. You will find your code to edit in this file. If you know HTML, you’re good to go. Just make sure your Google Analytics script block of code is pasted after other </script> tags as well as before the </head> tag.

    The reason I ask is because the Cookie Control plugin automatically places the Analytics script at the bottom of the HTML just before the closing BODY tag (along with some of its own coding).

    Now, if the Analytics script must come before the closing HEAD tag, then Cookie Control is not doing its work properly.


    Well, you were right. I completely removed Cookie Control and placed the Analytics script before the closing HEAD tag and now Google Analytics is tracking my visits once again.

    This means that it is invalid for Cookie Control to place the script before the closing BODY tag.

    There haven’t been any replies from the author to any support requests lately so perhaps he is dropping it. Pity.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘[Plugin: Cookie Control] Positioning of Google Analytics Code’ is closed to new replies.