Making WordPress.org


Ignore:
Timestamp:
02/14/2019 03:16:39 AM (6 years ago)
Author:
dd32
Message:

Trac: Enable Google Tag Manager for all Tracs rather than just core.trac.

Fixes #4172.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/trac.wordpress.org/templates/site.html

    r8226 r8243  
    6161<!--! Styles and such. Load before first JS file (jquery.js) -->
    6262<py:match path="head/script[contains(@src,'jquery.js')]">
     63    <script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
     64        new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
     65        j=d.createElement(s);j.async=true;j.src=
     66        'https://www.googletagmanager.com/gtm.js?id='+i;f.parentNode.insertBefore(j,f);
     67    })(window,document,'script','dataLayer','GTM-5Z8B3BX');</script>
     68
    6369    <!--! WP.org Global Header -->
    6470    <xi:include href="wporg-head.html" />
     
    278284
    279285<body py:match="body" id="wordpress-org" class="${project_slug} trac wporg-make make-${project_slug}" py:attrs="select('@*')">
    280 
    281     <!--! Analytics for Core Trac -->
    282     <py:if test="project_slug == 'core'">
    283         <script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
    284             new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
    285             j=d.createElement(s);j.async=true;j.src=
    286             'https://www.googletagmanager.com/gtm.js?id='+i;f.parentNode.insertBefore(j,f);
    287         })(window,document,'script','dataLayer','GTM-5Z8B3BX');</script>
    288         <noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-5Z8B3BX" height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
    289     </py:if>
    290 
     286    <noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-5Z8B3BX" height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
    291287    <!--! WP.org Global Header -->
    292288    <xi:include href="wporg-header.html" />
Note: See TracChangeset for help on using the changeset viewer.