Skip to content

Commit

Permalink
Défini les ids matomo et hotjar avec des variables d'environnement
Browse files Browse the repository at this point in the history
De façon à permettre une configuration différente entre la production et
la pré-production
  • Loading branch information
etienneCharignon committed Jan 20, 2021
1 parent 7aa2adc commit cbf405a
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
3 changes: 0 additions & 3 deletions app/assets/javascripts/hotjar.js

This file was deleted.

6 changes: 6 additions & 0 deletions app/assets/javascripts/hotjar.js.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
// Hotjar Tracking Code for https://api.app.eva.beta.gouv.fr
<% if ENV['HOTJAR_ID'].present? %>
tarteaucitron.user.hotjarId = <%= ENV['HOTJAR_ID'] %>;
tarteaucitron.user.HotjarSv = 6;
(tarteaucitron.job = tarteaucitron.job || []).push('hotjar');
<% end %>
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
// Matomo Tracking Code for https://api.app.eva.beta.gouv.fr
<% if ENV['MATOMO_ID'].present? %>
tarteaucitron.user.matomoHost = 'https://stats.data.gouv.fr/';
tarteaucitron.user.matomoId = 149;
tarteaucitron.user.matomoId = <%= ENV['MATOMO_ID'] %>;
(tarteaucitron.job = tarteaucitron.job || []).push('matomohightrack');
<% end %>

0 comments on commit cbf405a

Please sign in to comment.