Skip to content

Commit

Permalink
Suppression de Hotjar (#950)
Browse files Browse the repository at this point in the history
* remove useless hotjar

* update readmorelink
  • Loading branch information
SebastienReuiller authored Oct 20, 2023
1 parent 634069b commit 3b37015
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 61 deletions.
1 change: 0 additions & 1 deletion config/settings/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -603,7 +603,6 @@
# ------------------------------------------------------------------------------

GOOGLE_TAG_MANAGER_ID = env.str("GOOGLE_TAG_MANAGER_ID", "")
HOTJAR_ID = int(env.str("HOTJAR_ID", 0))
MATOMO_SITE_ID = int(env.str("MATOMO_SITE_ID", 0))
MATOMO_HOST = env.str("MATOMO_HOST", "")
MATOMO_TAG_MANAGER_CONTAINER_ID = env.str("MATOMO_TAG_MANAGER_CONTAINER_ID", "")
Expand Down
51 changes: 2 additions & 49 deletions lemarche/templates/includes/_tracker_tarteaucitron.html
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"useExternalCss": true, /* If false, the tarteaucitron.css file will be loaded */
"useExternalJs": false, /* If false, the tarteaucitron.js file will be loaded */
//"cookieDomain": ".my-multisite-domaine.fr", /* Shared cookie for multisite */
"readmoreLink": "https://doc.inclusion.beta.gouv.fr/mentions/protection-des-donnees", /* Change the default readmore link */
"readmoreLink": "https://storage.crisp.chat/public/documents/Crisp Privacy Policy FR.pdf", /* Change the default readmore link */
"mandatory": true, /* Show a message about mandatory cookies */
"mandatoryCta": true, /* Show the disabled accept button when mandatory on */
"forceLanguage": "fr",
Expand All @@ -39,11 +39,6 @@
tarteaucitron.user.googletagmanagerId = "{{ GOOGLE_TAG_MANAGER_ID }}";
(tarteaucitron.job = tarteaucitron.job || []).push('googletagmanager');

// Hotjar
tarteaucitron.user.hotjarId = {{ HOTJAR_ID }};
tarteaucitron.user.HotjarSv = 6;
(tarteaucitron.job = tarteaucitron.job || []).push('hotjar');

// Crisp (voir plus bas)
tarteaucitron.user.cripsWebsiteId = "{{ CRISP_ID }}";
tarteaucitron.user.cripsMore = function () {
Expand All @@ -57,48 +52,6 @@
(tarteaucitron.job = tarteaucitron.job || []).push('matomo');
</script>

<!-- Hotjar -->
<!-- <script type="text/javascript">
(function(h,o,t,j,a,r){
h.hj=h.hj||function(){(h.hj.q=h.hj.q||[]).push(arguments)};
//h._hjSettings={hjid:1932118,hjsv:6};
h._hjSettings={hjid:{{ HOTJAR_ID }},hjsv:6};
a=o.getElementsByTagName('head')[0];
r=o.createElement('script');r.async=1;
r.src=t+h._hjSettings.hjid+j+h._hjSettings.hjsv;
a.appendChild(r);
})(window,document,'https://static.hotjar.com/c/hotjar-','.js?sv=');
</script> -->

<!-- Crisp -->
<!-- <script type="text/javascript">
window.$crisp=[];
window.CRISP_WEBSITE_ID="{{ CRISP_ID }}";
(function() {
d=document;
s=d.createElement("script");
s.src="https://client.crisp.chat/l.js";
s.async=1;
d.getElementsByTagName("head")[0].appendChild(s);
})();
</script> -->

<!-- Matomo -->
<!-- <script type="text/javascript">
console.log('matomo script')
var _paq = window._paq || [];
/* tracker methods like "setCustomDimension" should be called before "trackPageView" */
_paq.push(['trackPageView']);
_paq.push(['enableLinkTracking']);
(function() {
var u="{{ MATOMO_HOST }}";
_paq.push(['setTrackerUrl', u+'piwik.php']);
_paq.push(['setSiteId', '{{ MATOMO_SITE_ID }}']);
var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
g.type='text/javascript'; g.async=true; g.defer=true; g.src=u+'piwik.js'; s.parentNode.insertBefore(g,s);
})();
</script> -->

<!-- Matomo UserID -->
<script>
var _paq = window._paq || [];
Expand All @@ -122,7 +75,7 @@
tarteaucitron.services.crips = {
"key": "crips",
"type": "support",
"name": "Crips",
"name": "Crisp",
"uri": "https://crisp.chat/fr/privacy/",
"needConsent": true,
"cookies": [],
Expand Down
10 changes: 0 additions & 10 deletions lemarche/templates/siaes/detail.html
Original file line number Diff line number Diff line change
Expand Up @@ -276,16 +276,6 @@ <h3 class="h2 m-0">
{% block extra_js %}
<script type="text/javascript">
document.addEventListener("DOMContentLoaded", function() {
// add hotjar event on show_data button
var showDataButton = document.querySelector('button#show_data');
// button is only displayed for authenticated users
if (showDataButton) {
showDataButton.addEventListener('click', () => {
// hotjar can be absent sometimes (cookies, adblock)
if (typeof hj !== 'undefined') { hj('event', 'siae_click_show_data'); }
});
}

// map
// siae coords output as floats with commas. We need to transform them into floats.
const siaeName = "{{ siae.name }}";
Expand Down
1 change: 0 additions & 1 deletion lemarche/utils/settings_context_processors.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ def expose_settings(request):
"BITOUBI_ENV": settings.BITOUBI_ENV,
"BITOUBI_ENV_COLOR": settings.BITOUBI_ENV_COLOR,
"GOOGLE_TAG_MANAGER_ID": settings.GOOGLE_TAG_MANAGER_ID,
"HOTJAR_ID": settings.HOTJAR_ID,
"MATOMO_SITE_ID": settings.MATOMO_SITE_ID,
"MATOMO_HOST": settings.MATOMO_HOST,
"MATOMO_TAG_MANAGER_CONTAINER_ID": settings.MATOMO_TAG_MANAGER_CONTAINER_ID,
Expand Down

0 comments on commit 3b37015

Please sign in to comment.