From 62a27d698caf2c1b56983b23e753bbb0d179045d Mon Sep 17 00:00:00 2001 From: pierrekuhn87 Date: Wed, 23 Dec 2020 14:24:44 +0100 Subject: [PATCH] Quand on utilise plusieurs services, on n' a pas beson d'avoir plusieurs fois dans le code de la page --- services/fb.html | 4 +--- services/fb_pixel.html | 7 +++---- services/gmap.html | 6 ++---- services/gtag.html | 8 +++----- tarteaucitron_pipelines.php | 4 +++- 5 files changed, 12 insertions(+), 17 deletions(-) diff --git a/services/fb.html b/services/fb.html index 3aa1301..ae840cc 100644 --- a/services/fb.html +++ b/services/fb.html @@ -1,3 +1 @@ - \ No newline at end of file +(tarteaucitron.job = tarteaucitron.job || []).push('facebook'); \ No newline at end of file diff --git a/services/fb_pixel.html b/services/fb_pixel.html index 3933ff8..ad79ccd 100644 --- a/services/fb_pixel.html +++ b/services/fb_pixel.html @@ -1,4 +1,3 @@ - \ No newline at end of file +tarteaucitron.user.facebookpixelId = '#CONFIG{tarteaucitron/services/fb_pixel}'; +tarteaucitron.user.facebookpixelMore = function () { /* add here your optionnal facebook pixel function */ }; +(tarteaucitron.job = tarteaucitron.job || []).push('facebookpixel'); \ No newline at end of file diff --git a/services/gmap.html b/services/gmap.html index 636eb23..b5023e8 100644 --- a/services/gmap.html +++ b/services/gmap.html @@ -1,4 +1,2 @@ - \ No newline at end of file +tarteaucitron.user.googlemapsKey = '#CONFIG{tarteaucitron/services/gmap}'; +(tarteaucitron.job = tarteaucitron.job || []).push('googlemaps'); \ No newline at end of file diff --git a/services/gtag.html b/services/gtag.html index 5327cad..a837d1a 100644 --- a/services/gtag.html +++ b/services/gtag.html @@ -1,5 +1,3 @@ - \ No newline at end of file +tarteaucitron.user.gtagUa = '#CONFIG{tarteaucitron/services/gtag}'; +tarteaucitron.user.gtagMore = function () { /* add here your optionnal gtag() */ }; +(tarteaucitron.job = tarteaucitron.job || []).push('gtag'); \ No newline at end of file diff --git a/tarteaucitron_pipelines.php b/tarteaucitron_pipelines.php index b558f42..2921647 100644 --- a/tarteaucitron_pipelines.php +++ b/tarteaucitron_pipelines.php @@ -47,7 +47,9 @@ function tarteaucitron_insert_head($flux) { */ function tarteaucitron_affichage_final($page) { if (!test_espace_prive() and tarteaucitron_actif()) { - $ajouter_services = tarteaucitron_liste_services_actifs(); + $ajouter_services = ''; if ($ajouter_services) { $page = str_replace('', $ajouter_services. '', $page);