Browse Source

Quand on utilise plusieurs services, on n' a pas beson d'avoir plusieurs fois <script></script> dans le code de la page

dev/surcharge_lang
pierrekuhn87 1 year ago
parent
commit
62a27d698c
  1. 4
      services/fb.html
  2. 7
      services/fb_pixel.html
  3. 6
      services/gmap.html
  4. 8
      services/gtag.html
  5. 4
      tarteaucitron_pipelines.php

4
services/fb.html

@ -1,3 +1 @@
<script type="text/javascript">
(tarteaucitron.job = tarteaucitron.job || []).push('facebook');
</script>
(tarteaucitron.job = tarteaucitron.job || []).push('facebook');

7
services/fb_pixel.html

@ -1,4 +1,3 @@
<script type="text/javascript">
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');
</script>
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');

6
services/gmap.html

@ -1,4 +1,2 @@
<script type="text/javascript">
tarteaucitron.user.googlemapsKey = '#CONFIG{tarteaucitron/services/gmap}';
(tarteaucitron.job = tarteaucitron.job || []).push('googlemaps');
</script>
tarteaucitron.user.googlemapsKey = '#CONFIG{tarteaucitron/services/gmap}';
(tarteaucitron.job = tarteaucitron.job || []).push('googlemaps');

8
services/gtag.html

@ -1,5 +1,3 @@
<script type="text/javascript">
tarteaucitron.user.gtagUa = '#CONFIG{tarteaucitron/services/gtag}';
tarteaucitron.user.gtagMore = function () { /* add here your optionnal gtag() */ };
(tarteaucitron.job = tarteaucitron.job || []).push('gtag');
</script>
tarteaucitron.user.gtagUa = '#CONFIG{tarteaucitron/services/gtag}';
tarteaucitron.user.gtagMore = function () { /* add here your optionnal gtag() */ };
(tarteaucitron.job = tarteaucitron.job || []).push('gtag');

4
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 = '<script type="text/javascript">';
$ajouter_services .= tarteaucitron_liste_services_actifs();
$ajouter_services .= '</script>';
if ($ajouter_services) {
$page = str_replace('</body>', $ajouter_services. '</body>', $page);

Loading…
Cancel
Save