Title: Code showing up when Google Analytics is enabled
Last modified: January 12, 2022

---

# Code showing up when Google Analytics is enabled

 *  Resolved [jlhsolutions](https://wordpress.org/support/users/jlhsolutions/)
 * (@jlhsolutions)
 * [4 years, 4 months ago](https://wordpress.org/support/topic/code-showing-up-when-google-analytics-is-enabled/)
 * Hello,
 * I added my Google Analytics code to the Under Construction plugin and now I am
   getting some code showing up at the top of my page. I just updated to the new
   version and I was hoping this was fixed, but I still have the code showing up.
 * `(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){(
   i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
   m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,
   m) })(window,document,'script','https://www.google-analytics.com/analytics.js','
   ga'); ga('create', 'UA-181859409-1', 'auto'); ga('send', 'pageview');`
 * What do I need to do to hide this? Also, it does not seem to be tracking when
   people hit my site.
 * Please advise how to fix this.
    Thanks!

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

 *  Plugin Author [Alexandru Tapuleasa](https://wordpress.org/support/users/talextech/)
 * (@talextech)
 * [4 years, 4 months ago](https://wordpress.org/support/topic/code-showing-up-when-google-analytics-is-enabled/#post-15245902)
 * Unfortunately the contents on the Content field are passed through wp_kses() 
   in order to adequately escape user input as required by WordPress and consequently
   <script> tags will be escaped and anything inside the tags will simply appear
   on the page as normal text 😕
    We understand this is far from ideal and will 
   try to find some way around it in the future releases.
 *  Thread Starter [jlhsolutions](https://wordpress.org/support/users/jlhsolutions/)
 * (@jlhsolutions)
 * [4 years, 4 months ago](https://wordpress.org/support/topic/code-showing-up-when-google-analytics-is-enabled/#post-15245944)
 * So is there a reason that the analytics aren’t showing up when people hit the
   under-construction page?
 * I’ve also seen this showing up on the login page.
    `Under Construction Mode is
   <b>enabled</b>.`
 *  Plugin Author [Alexandru Tapuleasa](https://wordpress.org/support/users/talextech/)
 * (@talextech)
 * [4 years, 4 months ago](https://wordpress.org/support/topic/code-showing-up-when-google-analytics-is-enabled/#post-15245997)
 * Well, the tracking code is just interpreted as text and will not actually track
   anything 🙁
 * As for the login page, that’s a bug as <b> tags should work, we’ll get that fixed.
 *  Thread Starter [jlhsolutions](https://wordpress.org/support/users/jlhsolutions/)
 * (@jlhsolutions)
 * [4 years, 4 months ago](https://wordpress.org/support/topic/code-showing-up-when-google-analytics-is-enabled/#post-15246447)
 * So the GA tracking code does not work even though it’s advertised that it does?
   What am I missing here?
 *  Plugin Author [Alexandru Tapuleasa](https://wordpress.org/support/users/talextech/)
 * (@talextech)
 * [4 years, 4 months ago](https://wordpress.org/support/topic/code-showing-up-when-google-analytics-is-enabled/#post-15246483)
 * Yes, but you will need to use the Google Analytics Tracking option in the Main
   settings tab.
 *  Thread Starter [jlhsolutions](https://wordpress.org/support/users/jlhsolutions/)
 * (@jlhsolutions)
 * [4 years, 4 months ago](https://wordpress.org/support/topic/code-showing-up-when-google-analytics-is-enabled/#post-15246909)
 * I did put my GA code there. Then it shows up the error message that I posted 
   in my first post. But when I go to the GA website, it never shows up that ANY
   traffic is on my site. And according to the response, “Well, the tracking code
   is just interpreted as text and will not actually track anything” it seems like
   this feature isn’t working at all.
 *  Plugin Author [Alexandru Tapuleasa](https://wordpress.org/support/users/talextech/)
 * (@talextech)
 * [4 years, 4 months ago](https://wordpress.org/support/topic/code-showing-up-when-google-analytics-is-enabled/#post-15247570)
 * Sorry, I misunderstood you, I though you were adding the JavaScript tracking 
   code yourself 😕
    We have found the issue and have pushed the fix in version 
   3.92 😊
    -  This reply was modified 4 years, 4 months ago by [Alexandru Tapuleasa](https://wordpress.org/support/users/talextech/).
      Reason: pushed update
 *  Thread Starter [jlhsolutions](https://wordpress.org/support/users/jlhsolutions/)
 * (@jlhsolutions)
 * [4 years, 4 months ago](https://wordpress.org/support/topic/code-showing-up-when-google-analytics-is-enabled/#post-15250999)
 * I installed the new version. Looks like the GA code is working now as it should.
   Thank you for that!
 * I still see this on the wp-login page.
    `Under Construction Mode is <b>enabled
   </b>.`

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

The topic ‘Code showing up when Google Analytics is enabled’ is closed to new replies.

 * ![](https://ps.w.org/under-construction-page/assets/icon-256x256.gif?rev=2284849)
 * [Under Construction](https://wordpress.org/plugins/under-construction-page/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/under-construction-page/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/under-construction-page/)
 * [Active Topics](https://wordpress.org/support/plugin/under-construction-page/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/under-construction-page/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/under-construction-page/reviews/)

 * 8 replies
 * 2 participants
 * Last reply from: [jlhsolutions](https://wordpress.org/support/users/jlhsolutions/)
 * Last activity: [4 years, 4 months ago](https://wordpress.org/support/topic/code-showing-up-when-google-analytics-is-enabled/#post-15250999)
 * Status: resolved