Title: Script Blocking box re-formatting HTML badly
Last modified: June 27, 2018

---

# Script Blocking box re-formatting HTML badly

 *  [Jan444](https://wordpress.org/support/users/ign2009/)
 * (@ign2009)
 * [7 years, 11 months ago](https://wordpress.org/support/topic/script-blocking-box-re-formatting-html-badly/)
 * Hi friends,
 * I’m trying to put this Analytics code on the Script Blocking box:
 *     ```
       <!-- Global site tag (gtag.js) - Google Analytics -->
       <script async src="https://www.googletagmanager.com/gtag/js?id=UA-121428573-1"></script>
       <script>
         window.dataLayer = window.dataLayer || [];
         function gtag(){dataLayer.push(arguments);}
         gtag('js', new Date());
   
         gtag('config', 'UA-123456789-1');
       </script>
       ```
   
 * Not sure if it only happens to me, but the first `script` tag is being transformed
   into an anchor tag `<a href=""></a>`.
 * Any ideas why?
    Thanks,

Viewing 1 replies (of 1 total)

 *  [andrewmperryman](https://wordpress.org/support/users/andrewmperryman/)
 * (@andrewmperryman)
 * [7 years, 11 months ago](https://wordpress.org/support/topic/script-blocking-box-re-formatting-html-badly/#post-10440130)
 * Hi, FYI….
 * I have no problems with adding the standard GA code snippet and it works fine
   for me.
 * None of the html tags are changed as I add the GA snippet for the cookie notice
   dashboard page.
    One wonders if you have a different dashboard setup or a plugin
   re-authoring as you type or on save, you know just like the visual editor does
   if you try and add what it considers dangerous tags.
 * Just as a friendly heads up if you can still edit your post above try removing
   or not posting your UA code (unless it is already a fake one.)
 * Hope you find a solution.
 * Andrew

Viewing 1 replies (of 1 total)

The topic ‘Script Blocking box re-formatting HTML badly’ is closed to new replies.

 * ![](https://ps.w.org/cookie-notice/assets/icon-256x256.png?rev=3549327)
 * [Compliance by Hu-manity.co](https://wordpress.org/plugins/cookie-notice/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/cookie-notice/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/cookie-notice/)
 * [Active Topics](https://wordpress.org/support/plugin/cookie-notice/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/cookie-notice/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/cookie-notice/reviews/)

## Tags

 * [formatting](https://wordpress.org/support/topic-tag/formatting/)

 * 1 reply
 * 2 participants
 * Last reply from: [andrewmperryman](https://wordpress.org/support/users/andrewmperryman/)
 * Last activity: [7 years, 11 months ago](https://wordpress.org/support/topic/script-blocking-box-re-formatting-html-badly/#post-10440130)
 * Status: not resolved