Open platform to collect and prioritize feedback
add google analytics
goenningdd443d9aaba6
diff --git a/public/site/ShowIdeaPage.tsx b/public/site/ShowIdeaPage.tsxindex aab9603fc..1635871e2 100644--- a/public/site/ShowIdeaPage.tsx+++ b/public/site/ShowIdeaPage.tsx@@ -24,6 +24,7 @@ export class ShowIdeaPage extends React.Component<{}, {}> {this.user = getCurrentUser();this.idea = get<Idea>('idea');this.comments = getArray<Comment>('comments');+ document.title = `${this.idea.title} · Idea #${this.idea.number} · ${document.title}`;}public render() {diff --git a/views/base.html b/views/base.htmlindex dc7df2222..065370790 100644--- a/views/base.html+++ b/views/base.html@@ -9,6 +9,18 @@<title>{{template "title" .}}</title></head><body>+ {{ if eq .settings.Environment "production" }}+ <script>+ (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.src=g;m.parentNode.insertBefore(a,m)+ })(window,document,'script','https://www.google-analytics.com/analytics.js','ga');++ ga('create', 'UA-100765645-1', 'auto');+ ga('set', 'dimension1', '{{ .tenant.Subdomain }}');+ ga('send', 'pageview');+ </script>+ {{ end }}<div id="root"></div>{{template "content" .}}<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.2.0/jquery.min.js" integrity="sha256-JAW99MJVpJBGcbzEuXk4Az05s/XyDdBomFqNlM3ic+I=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/react/15.4.2/react.min.js" integrity="sha256-Rtnfi1MVZAj3v+eDeFjh/iAXo8//D0zVKql8fjVLCiM=" crossorigin="anonymous"></script>