• Resolved Daniel Iser

    (@danieliser)


    Curious if you plan to or have already decided not to support the new wp_body_open hook that most themes adopted last year.

    That would allow you to render in optimal locations without custom code.

    Obviously it needs to become a new option in your list so that existing installs don’t suddenly start showing 2 copies of the tags, but otherwise would be the most solid solution.

    • This topic was modified 3 years, 11 months ago by Daniel Iser.
Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Thomas Geiger

    (@duracelltomi)

    Hi,

    wp_body_open is only needed to place the noscript/iframe code which is usually needed for Google Search Console verification and to give some fallback functionality in browsers where JavaScript is disabled for some reason.

    Could you elaborate more on this? Why would it be better to NOT support wp_body_open?

    Thread Starter Daniel Iser

    (@danieliser)

    @duracelltomi – Sorry missed this one, it would be better to render it there, was asking if you had already came to a conclusion otherwise.

    I was suggesting your plugin should render there as an option. It didn’t at the time of writing this, sorry for the confusion.

    Also “Just inside the <body>” is what most all of the Google scripts recommend in their docs as far as I’m aware (tags, ga, search console etc).

    Plugin Author Thomas Geiger

    (@duracelltomi)

    If you choose the codeless placement option, then the noscript part of the GTM container code will render using the wp_body_open with supporting themes.

    The main GTM container code will still render in the head as suggested in the doc:
    https://developers.google.com/tag-manager/quickstart

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Support wp_body_open rendering’ is closed to new replies.