Changeset 33780


Ignore:
Timestamp:
2019-12-10T11:07:25+13:00 (4 years ago)
Author:
kjdon
Message:

added code to add google-analytics to each page

Location:
documentation/trunk/tutorials/processing
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • documentation/trunk/tutorials/processing/common.xsl

    r28505 r33780  
    234234  </xsl:template>
    235235
     236  <xsl:template name="add-google-analytics">
     237    <!-- Global site tag (gtag.js) - Google Analytics -->
     238    <script async="" src="https://www.googletagmanager.com/gtag/js?id=UA-9967942-5"></script>
     239    <script>
     240      window.dataLayer = window.dataLayer || [];
     241      function gtag(){dataLayer.push(arguments);}
     242      gtag('js', new Date());
     243     
     244      gtag('config', 'UA-9967942-5');
     245    </script>
     246
     247  </xsl:template>
    236248</xsl:stylesheet>
    237249
  • documentation/trunk/tutorials/processing/xml-to-many-html.xsl

    r25472 r33780  
    1515      <head>
    1616    <title><xsl:apply-templates select="Title/Text"/></title>
     17    <xsl:call-template name="add-google-analytics"/>
    1718      </head>
    1819      <body>
Note: See TracChangeset for help on using the changeset viewer.