WordPress.org

Making WordPress.org

Opened 4 weeks ago

Last modified 4 weeks ago

#4625 new defect

Slack info page is missing Google Tag Manager code

Reported by: jonoaldersonwp Owned by:
Milestone: Priority: lowest
Component: Slack & IRC Keywords: analytics
Cc:

Description

https://make.wordpress.org/chat/ omits our GTM snippet. This should be added.

Change History (3)

#1 @Otto42
4 weeks ago

What is the script code that needs to be added to the head section? This should probably be added to the mu-plugin that enables the rest of the chat page code.

#2 @jonoaldersonwp
4 weeks ago

Same as on other wp.org pages/templates.

In the head:

<script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
})(window,document,'script','dataLayer','GTM-P24PF4B');</script>

Immediately after the opening body tag:

<noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-P24PF4B" height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>

#3 @SergeyBiryukov
4 weeks ago

  • Component changed from General to Slack & IRC
Note: See TracTickets for help on using tickets.