[wp-trac] [WordPress Trac] #12563: New action on body open

WordPress Trac noreply at wordpress.org
Tue Mar 29 12:50:14 UTC 2016


#12563: New action on body open
-----------------------------+--------------------------
 Reporter:  joostdevalk      |       Owner:  joostdevalk
     Type:  enhancement      |      Status:  reopened
 Priority:  normal           |   Milestone:
Component:  Themes           |     Version:  3.1
 Severity:  normal           |  Resolution:
 Keywords:  has-patch close  |     Focuses:
-----------------------------+--------------------------
Changes (by lexiqueen):

 * status:  closed => reopened
 * resolution:  duplicate =>


Comment:

 Replying to [comment:33 Denis-de-Bernardy]:
 > Replying to nacin:
 > > I'm marking this ticket as a duplicate of #21506.
 >
 > Imho, there isn't that much overlap.
 >
 > This ticket is about a separate hook, geared towards (admittedly in-
 optimally written) code that would need to insert stuff immediately after
 the <body> tag. The ticket references Google Analytics code that has
 changed since, but there are separate use-cases that keep this other hook
 a valid issue. Two among them that I can think of off the top of my head:
 >
 > 1. The occasional need to start an output buffer that only affects the
 contents of the <body> tag, without replying to regexp-fu such as outlined
 by Mike further up.
 >
 > 2. A/B testing related code (Google web optimizer comes to mind, or
 whatever its name is nowadays, but there are other such scripts used in
 internet marketing spheres). These frequently need code to be inserted
 after the <body> tag rather than before </head>.


 I'd like to add that Google Tag Manager is often used by the company I
 work for in websites, and that requires being inserted right after the
 opening <body>. It specifies this in the official documentation
 ([https://support.google.com/tagmanager/answer/6103696?hl=en&ref_topic=3441530#AddingTheContainerSnippet])
 so this ticket still remains relevant.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/12563#comment:34>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list