diff --git a/.env.template b/.env.template index bf61da7e..a151a566 100644 --- a/.env.template +++ b/.env.template @@ -9,3 +9,5 @@ RECAPTCHA_SITE_KEY=6LdL6s-------------- RECAPTCHA_SECRET_KEY=6LdL6s-------------- DISCOURSE_ADMIN_ROLE=DISCOURSE_ADMIN_ROLE SENTRY_DSN=http://public@example.com/project-id +GA_MEASUREMENT_ID=UA-XXXXX-Y +AMPLITUDE_API_KEY=API-KEY diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb index 21fc81d2..e95dc286 100644 --- a/app/views/layouts/application.html.erb +++ b/app/views/layouts/application.html.erb @@ -24,6 +24,8 @@ + <%= render 'shared/analytics_scripts'%> + <%= yield %> diff --git a/app/views/shared/_analytics_scripts.html.erb b/app/views/shared/_analytics_scripts.html.erb new file mode 100644 index 00000000..bc431664 --- /dev/null +++ b/app/views/shared/_analytics_scripts.html.erb @@ -0,0 +1,45 @@ + + + + + + + + + + diff --git a/app/views/static_pages/home.html.erb b/app/views/static_pages/home.html.erb index e09cc3f6..74f8e332 100644 --- a/app/views/static_pages/home.html.erb +++ b/app/views/static_pages/home.html.erb @@ -1,9 +1,9 @@ <% content_for :head do %> - + - - + + <% end %>