Jump to content

Google conversion codes on Prestashop 1.7


Recommended Posts

Hi, i want to know how to add conversion codes in some pages of prestashop 1.7, i have a paid theme and in some pages (maybe all) there is no <head> </head> tags to embed the codes. The only place i could embed the code was in the head.tpl file for the Global Site Tag. 

I have to add the following code in the contact page (contact.tpl) and the instructions are to paste it on the head tags but in the code of the page there is no head tags.
 <!-- Event snippet for Contacto conversion page
In your html page, add the snippet and call gtag_report_conversion when someone clicks on the chosen link or button. -->
function gtag_report_conversion(url) {
var callback = function () {
if (typeof(url) != 'undefined') {
window.location = url;
gtag('event', 'conversion', {
'send_to': 'AW-XXXXXXXXX/_gkcCJeKiqIBEJ6D4OcC',
'event_callback': callback
return false;

I even used the {literal} thing and it doesn't work.
Anyone know how to embed those codes without using any module?

Link to comment
Share on other sites

  • 4 years later...

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...