Title: [Plugin: Cookie Control] Positioning of Google Analytics Code
Last modified: August 20, 2016

---

# [Plugin: Cookie Control] Positioning of Google Analytics Code

 *  [mckendrick](https://wordpress.org/support/users/mckendrick/)
 * (@mckendrick)
 * [13 years, 10 months ago](https://wordpress.org/support/topic/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.
 * [http://wordpress.org/extend/plugins/cookie-control/](http://wordpress.org/extend/plugins/cookie-control/)

Viewing 3 replies - 1 through 3 (of 3 total)

 *  [austenm](https://wordpress.org/support/users/austenm/)
 * (@austenm)
 * [13 years, 10 months ago](https://wordpress.org/support/topic/plugin-cookie-control-positioning-of-google-analytics-code/#post-2961097)
 * 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.
 *  Thread Starter [mckendrick](https://wordpress.org/support/users/mckendrick/)
 * (@mckendrick)
 * [13 years, 10 months ago](https://wordpress.org/support/topic/plugin-cookie-control-positioning-of-google-analytics-code/#post-2961102)
 * 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.
 *  Thread Starter [mckendrick](https://wordpress.org/support/users/mckendrick/)
 * (@mckendrick)
 * [13 years, 10 months ago](https://wordpress.org/support/topic/plugin-cookie-control-positioning-of-google-analytics-code/#post-2961183)
 * austenm:
 * 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.

 * ![](https://s.w.org/plugins/geopattern-icon/cookie-control_ceeddc.svg)
 * [Cookie Control](https://wordpress.org/plugins/cookie-control/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/cookie-control/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/cookie-control/)
 * [Active Topics](https://wordpress.org/support/plugin/cookie-control/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/cookie-control/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/cookie-control/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [mckendrick](https://wordpress.org/support/users/mckendrick/)
 * Last activity: [13 years, 10 months ago](https://wordpress.org/support/topic/plugin-cookie-control-positioning-of-google-analytics-code/#post-2961183)
 * Status: not resolved