• 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)
  • 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.