...
Code Block | ||
---|---|---|
| ||
<xsl:template name="page.js">
<script type="text/javascript">
<xsl:choose>
<xsl:when test="$serverEnv='my.uchicago.edu'">
var env = "<xsl:value-of select="$serverEnv" />";
var gaAcct = "*************";
</xsl:when>
<xsl:when test="$serverEnv='mystage.uchicago.edu'">
var env = "<xsl:value-of select="$serverEnv" />";
var gaAcct = "*************";
</xsl:when>
<xsl:otherwise>
var env = "<xsl:value-of select="$serverEnv" />";
var gaAcct = "*************";
</xsl:otherwise>
</xsl:choose>
var _gaq = _gaq || [];
_gaq.push(['_setAccount', gaAcct]);
_gaq.push(['_setDomainName', env]);
_gaq.push(['_trackPageview']);
</script>
</xsl:template>
<xsl:template name="tracking-action">
<script type="text/javascript">
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(ga);
})();
</script>
</xsl:template> |
Info | ||||
---|---|---|---|---|
| ||||
...