blob: 963b61dd1a7e17c1a49971736735fd2821d63ae7 [file] [log] [blame]
</div> [# End <div id="maincol"> from header.ezt]
[include "footer-shared.ezt"]
<script type="text/javascript" nonce="[nonce]">
// Google Analytics
(function(i,s,o,g,r,a,m){i[[]'GoogleAnalyticsObject']=r;i[[]r]=i[[]r]||function(){
(i[[]r].q=i[[]r].q||[[]]).push(arguments)},i[[]r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[[]0];a.async=1;a.setAttribute('nonce','[nonce]');
a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
(function setupGoogleAnalytics() {
const _EMAIL_REGEX =
["/([a-zA-Z0-9_\-\.]+)@([a-zA-Z0-9_\-\.]+)\.([a-zA-Z]{2,5})/"];
ga('create', '[analytics_id]', {'siteSpeedSampleRate': 100});
[if-any logged_in_user]
ga('set', 'dimension1', 'Logged in');
[else]
ga('set', 'dimension1', 'Not logged in');
[end]
const path = window.location.href.slice(window.location.origin.length);
if (path.startsWith('/u')) {
[# Keep anything that looks like an email address out of GA.]
ga('set', 'title', 'A user page');
ga('set', 'location', path.replace(_EMAIL_REGEX, 'user@example.com'));
}
ga('send', 'pageview');
})();
</script>
<ezt-app-base [if-any logged_in_user]
userDisplayName="[logged_in_user.email]"[end]
projectName="[projectname]"
></ezt-app-base>
</body>
</html>