yberges Posted November 15, 2019 Share Posted November 15, 2019 Bonjour j'ai un tag generique et un tag de convertion à ajouter a mon site prestashop ils sont du type <script async src="https://www.googletagmanager.com/gtag/js?id=AW-XXXXXXXX"></script> <script> window.dataLayer = window.dataLayer || []; function gtag(){dataLayer.push(arguments);} gtag('js', new Date()); gtag('config', 'AW-XXXX'); </script> et <!-- Event snippet for vente conversion page --> <script> gtag('event', 'conversion', { 'send_to': 'AW-XXXXX/lBDeCKLi87MBEPfAlcwC', 'transaction_id': '' }); </script> je pense que le premier peu s'ajouter directement depuis le module mais le second c'est quoi la meilleure approche ? Merci Link to comment Share on other sites More sharing options...
yberges Posted November 18, 2019 Author Share Posted November 18, 2019 PErsonne ? Link to comment Share on other sites More sharing options...
YopixelAE Posted November 21, 2019 Share Posted November 21, 2019 Bonjour, Le premier tag générique inséré via le module va se placer dans le {$HOOK_HEADER} par défaut (de souvenir). Pour le second, vous pouvez créer un module et l'ancrer dans le hookOrderConfirmation. Vous pouvez autrement placer directement le script dans le orderConfirmation.tpl Vérifiez coté front-office dans le code source l'affichage correct de vos balises <script> Link to comment Share on other sites More sharing options...
yberges Posted November 21, 2019 Author Share Posted November 21, 2019 (edited) j'ai mis le code 1 dans header.tpl et le 2 dans order-confirmation.tpl {literal}<script> window.dataLayer = window.dataLayer || []; function gtag(){dataLayer.push(arguments);} gtag('js', new Date()); gtag('config', 'AW-696606839'); </script> {/literal} {literal} <!-- Event snippet for vente conversion page --> <script> gtag('event', 'conversion', { 'send_to': 'AW-XXXXX/lBDeCKLi87MBEPfAlcwC', 'transaction_id': '' }); </script> {/literal} ca devrait bon non ? Edited November 21, 2019 by yberges (see edit history) Link to comment Share on other sites More sharing options...
YopixelAE Posted November 21, 2019 Share Posted November 21, 2019 Oui. Vérifiez coté front-office dans le code source l'affichage correct de vos balises <script> Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now