Martin Posted May 8, 2008 Share Posted May 8, 2008 Any one know how to add conversion tracking to prestashop what file and where in the file should i paste the google code ?? tryed order_confermation.php but that just broke all the accept order requists help plz Link to comment Share on other sites More sharing options...
stampy Posted September 1, 2008 Share Posted September 1, 2008 I also need to do this? Can anyone help? Link to comment Share on other sites More sharing options...
stampy Posted September 2, 2008 Share Posted September 2, 2008 Anyone?Thanks in advance. Link to comment Share on other sites More sharing options...
stampy Posted September 2, 2008 Share Posted September 2, 2008 HiI'm really struggling with this, particularly because the customer will leave the site to pay via paypal, and won't necessarily return. So where can I put the code to track the sale? Link to comment Share on other sites More sharing options...
superstockhx Posted February 22, 2009 Share Posted February 22, 2009 Nobody has any updates on this? We installed Google conversion tracking on both of our ecommerce prestashop sites, but it does not appear to be tracking correctly.HELP Link to comment Share on other sites More sharing options...
L. Brett Sinclair Posted February 23, 2009 Share Posted February 23, 2009 why don't you manage this in google analytics?creates 2 different goals. Link to comment Share on other sites More sharing options...
batevladi Posted March 24, 2009 Share Posted March 24, 2009 Just in case anyone is still needing this enhancement i.e. Conversion Tracking for Google AdWords, see the attached. It is a modified version of the the Google Analytics module... (sorry was lazy to rewrite it as a new module) All you need to do is save (overwrite) this file in the your_prestashop_root/modules/ganalytics/ directory.You need to set-up an Action in the Conversion Tracking menu on Google Analytics. You will need two elements from the script - look for these lines and copy the values (here marked with NNNNN) and paste in the module configuration form:var google_conversion_id = NNNNNNNNNNN; // the number (here marked with NNNNNN) // needs to go in the Conversion ID field .. var google_conversion_label = "NNNNNNNNN"; // the string (here marked with NNNNNNN) // needs to go in the Conversion Label field The enhancement will tell Google the total price of the purchase (once they complete the purchase the code will be activated)This module has been tested on PrestaShop v1.1 with English language (although the enhancement is ready for other languages, I have not translated...)Hope this is helpful!Vlad ganalytics.php Link to comment Share on other sites More sharing options...
batevladi Posted April 22, 2009 Share Posted April 22, 2009 Just updated the file above with a new hook - the original code had a problem tracking PayPal conversion as paypal module never confrims the order, unless the customer clicks on the "return to merchant" button... Just testing at the moment, will be able to tell shortly.And the result is negative... as for GA conversion etc tracking to work, the code needs to be rendered in browser, so, I am stuck... :down:Vlad Link to comment Share on other sites More sharing options...
kratzbaum Posted April 29, 2009 Share Posted April 29, 2009 Hi batevladi,this sounds like the exact solution to my problem.Do you know if anyone has tested this with PS 1.08?Cheers Link to comment Share on other sites More sharing options...
batevladi Posted April 30, 2009 Share Posted April 30, 2009 Sorry kratzbaum, see my comment above. the module is tested with 1.1V Link to comment Share on other sites More sharing options...
kratzbaum Posted April 30, 2009 Share Posted April 30, 2009 All right. I saw that, but was hoping that it was already tested with 1.08. I think I'll just use it an report back how it went.Thanks anyway! Link to comment Share on other sites More sharing options...
kyrre Posted July 1, 2009 Share Posted July 1, 2009 kratzbaum: Did you try the script? Did it work? Link to comment Share on other sites More sharing options...
kratzbaum Posted July 1, 2009 Share Posted July 1, 2009 Hi Kyrre,I haven't implemented it yet. For now I'm only tracking conversions with Google Analytics which works fine. Link to comment Share on other sites More sharing options...
guyk Posted July 2, 2009 Share Posted July 2, 2009 Hi, it works but only on chequesprobably because the hooking orderconfirmation is not visible with online payments, like atos.I put it in the page just before the payment , quick'n dirty: ganalytics.php, change the modified end with $output .= ' pageTracker._trackTrans(); [removed]'; $output .= GAnalytics::get_conversion_code(); return $output; } } static function get_conversion_code() { if (!Configuration::get('ADWORDS_CODE')) return ''; return(' [removed] <!-- var google_conversion_id = '.Configuration::get('ADWORDS_CODE').'; var google_conversion_language = "fr"; var google_conversion_format = "3"; var google_conversion_color = "ffffff"; var google_conversion_label = "'.Configuration::get('ADWORDS_LABEL').'"; //--> [removed] [removed] [removed] '); } } ?> in the ugly atos pre-payment page codemodule/atos/call_request.php } else { if (file_exists(dirname(__FILE__).'/../ganalytics/ganalytics.php')) { include(dirname(__FILE__).'/../ganalytics/ganalytics.php'); print GAnalytics::get_conversion_code(); } print ("Paiement par Carte Bancaire. "); print (" Régler votre achat d'un montant total de $amount € par carte bancaire. "); print (" ".str_replace('SSL, ','SSL, ',$message)." "); actually, it is not the real prestashop's atos implementation, it is modatospresta , https://sourceforge.net/projects/modatospresta/I hope in the official one the hook is visible and possible Link to comment Share on other sites More sharing options...
jcharo Posted August 10, 2009 Share Posted August 10, 2009 Wich modulo for Google Analytics are you using? Link to comment Share on other sites More sharing options...
jjbaulikki Posted August 10, 2009 Share Posted August 10, 2009 Just in case anyone is still needing this enhancement i.e. Conversion Tracking for Google AdWords, see the attached. It is a modified version of the the Google Analytics module... (sorry was lazy to rewrite it as a new module) All you need to do is save (overwrite) this file in the your_prestashop_root/modules/ganalytics/ directory.You need to set-up an Action in the Conversion Tracking menu on Google Analytics. You will need two elements from the script - look for these lines and copy the values (here marked with NNNNN) and paste in the module configuration form:var google_conversion_id = NNNNNNNNNNN; // the number (here marked with NNNNNN) // needs to go in the Conversion ID field .. var google_conversion_label = "NNNNNNNNN"; // the string (here marked with NNNNNNN) // needs to go in the Conversion Label field The enhancement will tell Google the total price of the purchase (once they complete the purchase the code will be activated)This module has been tested on PrestaShop v1.1 with English language (although the enhancement is ready for other languages, I have not translated...)Hope this is helpful!Vlad Thanks Link to comment Share on other sites More sharing options...
rcking Posted October 1, 2009 Share Posted October 1, 2009 hi,any idea how use this on others payment like paypal, cod and bank-wire? Link to comment Share on other sites More sharing options...
inveostore.com Posted January 10, 2011 Share Posted January 10, 2011 For PayPal see thread [sOLUTION] How to make Google Adwords Conversions work with PayPal. Link to comment Share on other sites More sharing options...
chrisdata Posted April 3, 2012 Share Posted April 3, 2012 so how's this tracking code working for Prestashop 1.4.7 & PayPal so far? Link to comment Share on other sites More sharing options...
Antonio Mecca Posted April 19, 2013 Share Posted April 19, 2013 Hi martin. You must place the google adwords conversions script at the end of the order-confirmation.tpl. It work for me. 1 Link to comment Share on other sites More sharing options...
nematodesdirect Posted May 9, 2015 Share Posted May 9, 2015 (edited) Hi, Did you get this sorted in the end, if not below is how I managed to get it to work (its a bit of a bodge job but it was very easy and worked a treat on my PrestaShop™ 1.5.2.0) Open your theme order confirmation file: /themes/your-theme/order-confirmation.tpl Login to your adwords account and generate your custom conversion tracking code. Paste your Adwords conversion code at the bottom below the last /if tag. Change this parameter within your adwords conversion tracking code: var google_conversion_value = <literal>{$trans.total};</literal> Save and push the file live Do a test transaction to make sure you haven't made a fatal error Watch the data appear in your adwords account (It takes about an hour from when your first order was placed. Hope that helps (My adwords code with my ID's removed) <!-- START Google Code for Order Conf Conversion Page --><script type="text/javascript">/* <![CDATA[ */var google_conversion_id = YOUR-ID-HERE;var google_conversion_language = "en";var google_conversion_format = "3";var google_conversion_color = "ffffff";var google_conversion_label = "YOUR-LABEL-HERE";var google_conversion_value = <literal>{$trans.total};</literal>var google_conversion_currency = "GBP";var google_remarketing_only = false;/* ]]> */</script><script type="text/javascript" src="//www.googleadservices.com/pagead/conversion.js"></script><noscript><div style="display:inline;"><img height="1" width="1" style="border-style:none;" alt="" src="//www.googleadservices.com/pagead/conversion/YOURVALUE/?value=0.00¤cy_code=GBP&label=YOURLABEL&guid=ON&script=0"/></div></noscript><!-- END Google Adwords Code for Order Conf Conversion Page --> Edited July 19, 2016 by nematodesdirect (see edit history) Link to comment Share on other sites More sharing options...
joostjoost Posted July 15, 2016 Share Posted July 15, 2016 Hello, I'm searching for a solution for about half a year now and I really don't know how to make this google adwords conversion tracking implementation working. I have pasted my codes in public_html->my-theme->order-confirmation.tpl. This is my code: {/if} <!-- Google Code for (...) Conversion Page --> <script type="text/javascript"> /* <![CDATA[ */ {assign var='id_cart' value={$request_uri|regex_replace:"/.*id_cart=([\d]*).*/":"$1"[spam-filter] {assign var='total_cart' value={$cart->getTotalCart($id_cart)|regex_replace:"/[\D]+.*/":""[spam-filter] {literal} var google_conversion_id = 123456789; var google_conversion_language = "en"; var google_conversion_format = "3"; var google_conversion_color = "ffffff"; var google_conversion_label = "my label"; var google_remarketing_only = false; var google_conversion_value = {/literal}{$total_cart}{literal};{/literal} /* ]]> */ </script> <script type="text/javascript" src="//www.googleadservices.com/pagead/conversion.js"> </script> <noscript> <div style="display:inline;"> <img height="1" width="1" style="border-style:none;" alt="" src="//www.googleadservices.com/pagead/conversion/928385315/?label=8MnhCJ7pt2gQo5LYugM&guid=ON&script=0"/> </div> </noscript> This is what google tag assistant says: - Conversion value should be prefixed with standard currency. (so it has to be €) - Missing line breaks may cause issues - Code should be placed directly above the closing <body> tag I don't know how to fix this. Can anyone help me? Thank you in advance! Link to comment Share on other sites More sharing options...
nematodesdirect Posted July 19, 2016 Share Posted July 19, 2016 Hello, I'm searching for a solution for about half a year now and I really don't know how to make this google adwords conversion tracking implementation working. I have pasted my codes in public_html->my-theme->order-confirmation.tpl. This is my code: {/if} <!-- Google Code for (...) Conversion Page --> <script type="text/javascript"> /* <![CDATA[ */ {assign var='id_cart' value={$request_uri|regex_replace:"/.*id_cart=([\d]*).*/":"$1"[spam-filter] {assign var='total_cart' value={$cart->getTotalCart($id_cart)|regex_replace:"/[\D]+.*/":""[spam-filter] {literal} var google_conversion_id = 123456789; var google_conversion_language = "en"; var google_conversion_format = "3"; var google_conversion_color = "ffffff"; var google_conversion_label = "my label"; var google_remarketing_only = false; var google_conversion_value = {/literal}{$total_cart}{literal};{/literal} /* ]]> */ </script> <script type="text/javascript" src="//www.googleadservices.com/pagead/conversion.js"> </script> <noscript> <div style="display:inline;"> <img height="1" width="1" style="border-style:none;" alt="" src="//www.googleadservices.com/pagead/conversion/928385315/?label=8MnhCJ7pt2gQo5LYugM&guid=ON&script=0"/> </div> </noscript> This is what google tag assistant says: - Conversion value should be prefixed with standard currency. (so it has to be €) - Missing line breaks may cause issues - Code should be placed directly above the closing <body> tag I don't know how to fix this. Can anyone help me? Thank you in advance! Hi, I've just updated the code in the example above, try that - don't forget to change your currency to EUR :-) Link to comment Share on other sites More sharing options...
Designinfo.in Posted August 12, 2016 Share Posted August 12, 2016 Hello, I'm searching for a solution for about half a year now and I really don't know how to make this google adwords conversion tracking implementation working. I have pasted my codes in public_html->my-theme->order-confirmation.tpl. This is my code: {/if} <!-- Google Code for (...) Conversion Page --> <script type="text/javascript"> /* <![CDATA[ */ {assign var='id_cart' value={$request_uri|regex_replace:"/.*id_cart=([\d]*).*/":"$1"[spam-filter] {assign var='total_cart' value={$cart->getTotalCart($id_cart)|regex_replace:"/[\D]+.*/":""[spam-filter] {literal} var google_conversion_id = 123456789; var google_conversion_language = "en"; var google_conversion_format = "3"; var google_conversion_color = "ffffff"; var google_conversion_label = "my label"; var google_remarketing_only = false; var google_conversion_value = {/literal}{$total_cart}{literal};{/literal} /* ]]> */ </script> <script type="text/javascript" src="//www.googleadservices.com/pagead/conversion.js"> </script> <noscript> <div style="display:inline;"> <img height="1" width="1" style="border-style:none;" alt="" src="//www.googleadservices.com/pagead/conversion/928385315/?label=8MnhCJ7pt2gQo5LYugM&guid=ON&script=0"/> </div> </noscript> This is what google tag assistant says: - Conversion value should be prefixed with standard currency. (so it has to be €) - Missing line breaks may cause issues - Code should be placed directly above the closing <body> tag I don't know how to fix this. Can anyone help me? Thank you in advance! Hey, Did you find a solution ? Link to comment Share on other sites More sharing options...
joostjoost Posted August 13, 2016 Share Posted August 13, 2016 Yes, thank you nematodesdirect! Link to comment Share on other sites More sharing options...
Nass_Nass Posted November 18, 2016 Share Posted November 18, 2016 Hi, I've just updated the code in the example above, try that - don't forget to change your currency to EUR :-) Hi guys, isnt work for me... the page crashed, doesnt work. Any other suggestionS? Link to comment Share on other sites More sharing options...
Recommended Posts