williambesson Posted June 10, 2013 Share Posted June 10, 2013 Hello, I have seen this question on another thread but it was 2 years old and the solution didn't work for me unfortunately. So here's my question: Where should I put the google adwords tracking code so that I can see conversions in my google adwords account. I have tried an add-on module but this one didn't work and the support was non existent. Many thanks for your help on this. Guillaume Besson PS: I have PS version 1.4.2 Link to comment Share on other sites More sharing options...
vekia Posted June 10, 2013 Share Posted June 10, 2013 you should use it on order-confirmation page, which mean that you have to insert this code in: themes/YOUR_THEME/order-confirmation.tpl can you please paste the script you've got? i'm asking because you have to use {literal}{/literal} tags probably Link to comment Share on other sites More sharing options...
williambesson Posted June 10, 2013 Author Share Posted June 10, 2013 Many thanks for such a fast reply: I might know where the problem is. I have themes/prestashop/order-confirmation.tpl where I did put the code. and there is themes/mytheme/order-confirmation.tpl where I didn't put the code. Do you think this is the problem? Thanks Link to comment Share on other sites More sharing options...
vekia Posted June 10, 2013 Share Posted June 10, 2013 yes of course! you have to insert tracking code to the theme that you use, if you use /mytheme/ - insert code there Link to comment Share on other sites More sharing options...
williambesson Posted June 10, 2013 Author Share Posted June 10, 2013 OK thanks a ton. I will try that and report the result here in case someone has the same issue. Thanks again. Link to comment Share on other sites More sharing options...
vekia Posted June 10, 2013 Share Posted June 10, 2013 okay, feel free to write if you've got any other questions or problems related to this case im waiting for your reply regards Link to comment Share on other sites More sharing options...
williambesson Posted June 11, 2013 Author Share Posted June 11, 2013 It's been now 24 hours. I have made 3 test purchases and no sign of conversions. Any idea where the problem could be? Regards Link to comment Share on other sites More sharing options...
vekia Posted June 11, 2013 Share Posted June 11, 2013 try to check page source (right click / view page source) when you're on order confirmation page does the google tracking code appear there? Link to comment Share on other sites More sharing options...
williambesson Posted June 13, 2013 Author Share Posted June 13, 2013 Here are my findings. I have been to the confirmation page and retrieved the source code. http://www.presencepro.fr/wp-content/uploads/2013/06/order-finalised-screen.jpg No trace of the google adwords conversion code there! This where I placed it though: http://www.presencepro.fr/wp-content/uploads/2013/06/order-confirmation-tpl.jpg Does it make sense to you? Link to comment Share on other sites More sharing options...
vekia Posted June 13, 2013 Share Posted June 13, 2013 maybe it is related to the smarty cache? Try to turn on force compilation (under the preferences > performance tab in BO) try again (order something and check page source) you can also clear smarty cache, just empty folders: cache/smarty/cache cache/smarty/compile Link to comment Share on other sites More sharing options...
markcox Posted December 3, 2013 Share Posted December 3, 2013 (edited) Did you ever get this to work? I've tried adding my adwords conversion script in to the order-confirmation.tpl file with and without the literal tags and nothing. Cleared the smarty cache etc, love PS but can't believe how difficult it is to add simple script tags from UA or Adwords from a fairly big player when it come to website acquisitions! if you did manage to get it to work i'd be grateful! Edited December 3, 2013 by markcox (see edit history) Link to comment Share on other sites More sharing options...
nspinheiro Posted December 27, 2013 Share Posted December 27, 2013 Hi I have one doubt I have universal pay module and another payment modules, using themes/YOUR_THEME/order-confirmation.tpl is enough? or inside the module i should include the code in some file? Link to comment Share on other sites More sharing options...
Totti Posted December 27, 2013 Share Posted December 27, 2013 I also would like to know how to implement the code where I take it ? Link to comment Share on other sites More sharing options...
jazzin Posted December 27, 2013 Share Posted December 27, 2013 Anyone get this to work? I have my code placed in order-confirmation.tpl, and still get no conversions. There's been hundreds of orders placed through my store. Link to comment Share on other sites More sharing options...
SaludShopping Posted February 6, 2014 Share Posted February 6, 2014 Google adwords with conversion tracking is very important for our business anyone managed to work it out? Link to comment Share on other sites More sharing options...
jazzin Posted February 6, 2014 Share Posted February 6, 2014 Google adwords with conversion tracking is very important for our business anyone managed to work it out? Still haven't gotten it to work. If you do, please post the solution. Link to comment Share on other sites More sharing options...
prestafrm Posted February 25, 2014 Share Posted February 25, 2014 Anyone managed to implement yet? Link to comment Share on other sites More sharing options...
jordiob Posted February 25, 2014 Share Posted February 25, 2014 You have to place it on order-confirmation.tpl and putting the script variables between {literal}{/literal} for ex. <script type="text/javascript"> /* <![CDATA[ */ {literal} var google_conversion_id = 123456789; var google_conversion_language = "en"; var google_conversion_format = "2"; var google_conversion_color = "ffffff"; var google_conversion_label = "AAAAAAAAAAAAAAAAAAA"; var google_conversion_value = 0; {/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/123456789/ ?label=AAAAAAAAAAAAAAAAAAA&guid=ON&script=0"/> </div> </noscript> That, of course, is for a macro conversion (a purchase on your site). then you also have micro conversions, for example a registration or generating a new cart, a call (lead) which you can also track as goal on Analytics or micro-conversion on Adwords 2 Link to comment Share on other sites More sharing options...
prestafrm Posted February 25, 2014 Share Posted February 25, 2014 Hi Jorgiob, Thanks for the info! I have now implemented on my site, thank you! I'm going to verify if its working later...... I guess, for the micro-conversions analytics goal I would just need to put the code into relevant .tpl files or is there any thing else which needs modification for the code to work? Kind regards, Link to comment Share on other sites More sharing options...
jordiob Posted February 26, 2014 Share Posted February 26, 2014 Hi! Goals area tracked from the same Analytics code. You'll have to define them under the Administration tab (on Analytics) Link to comment Share on other sites More sharing options...
prestafrm Posted March 1, 2014 Share Posted March 1, 2014 Hi Jordiob, Thanks for the info! Currently I'm having another related problem, please check my post link below, due to this problem I'm currently unable to test the above solution as well. Just wondering if you could help in this regard as well or refer me to somewhere for the solution? I have tried by removing the Google codes from the order-confirmation.tpl file or restoring the original file unfortunately, nothing has worked so far! http://www.prestashop.com/forums/topic/311605-paypal-order-confirmation-page/?do=findComment&comment=1578040 Thanks a lot! Best regards, Link to comment Share on other sites More sharing options...
martinhandy Posted August 19, 2014 Share Posted August 19, 2014 hi! can u help me? my order-confirmation.tpl inside the template looks like this: {capture name=path}{l s='Order confirmation'}{/capture} {include file="$tpl_dir./breadcrumb.tpl"} <h1>{l s='Order confirmation'}</h1> {assign var='current_step' value='payment'} {include file="$tpl_dir./order-steps.tpl"} {include file="$tpl_dir./errors.tpl"} {$HOOK_ORDER_CONFIRMATION} {$HOOK_PAYMENT_RETURN} <br /> {if $is_guest} <p>{l s='Your order ID is:'} <span class="bold">{$id_order_formatted}</span> . {l s='Your order ID has been sent via email.'}</p> <a href="{$link->getPageLink('guest-tracking', true, NULL, "id_order={$reference_order}&email={$email}")|escape:'html'}" title="{l s='Follow my order'}"><img src="{$img_dir}icon/order.gif" alt="{l s='Follow my order'}" class="icon" /></a> <a href="{$link->getPageLink('guest-tracking', true, NULL, "id_order={$reference_order}&email={$email}")|escape:'html'}" title="{l s='Follow my order'}">{l s='Follow my order'}</a> {else} <a href="{$link->getPageLink('history', true)|escape:'html'}" title="{l s='Back to orders'}"><img src="{$img_dir}icon/order.gif" alt="{l s='Back to orders'}" class="icon" /></a> <a href="{$link->getPageLink('history', true)|escape:'html'}" title="{l s='Back to orders'}">{l s='Back to orders'}</a> {/if} where should i put the conversion code? Link to comment Share on other sites More sharing options...
mikecheung Posted August 19, 2014 Share Posted August 19, 2014 hi! can u help me? my order-confirmation.tpl inside the template looks like this: {capture name=path}{l s='Order confirmation'}{/capture} {include file="$tpl_dir./breadcrumb.tpl"} <h1>{l s='Order confirmation'}</h1> {assign var='current_step' value='payment'} {include file="$tpl_dir./order-steps.tpl"} {include file="$tpl_dir./errors.tpl"} {$HOOK_ORDER_CONFIRMATION} {$HOOK_PAYMENT_RETURN} <br /> {if $is_guest} <p>{l s='Your order ID is:'} <span class="bold">{$id_order_formatted}</span> . {l s='Your order ID has been sent via email.'}</p> <a href="{$link->getPageLink('guest-tracking', true, NULL, "id_order={$reference_order}&email={$email}")|escape:'html'}" title="{l s='Follow my order'}"><img src="{$img_dir}icon/order.gif" alt="{l s='Follow my order'}" class="icon" /></a> <a href="{$link->getPageLink('guest-tracking', true, NULL, "id_order={$reference_order}&email={$email}")|escape:'html'}" title="{l s='Follow my order'}">{l s='Follow my order'}</a> {else} <a href="{$link->getPageLink('history', true)|escape:'html'}" title="{l s='Back to orders'}"><img src="{$img_dir}icon/order.gif" alt="{l s='Back to orders'}" class="icon" /></a> <a href="{$link->getPageLink('history', true)|escape:'html'}" title="{l s='Back to orders'}">{l s='Back to orders'}</a> {/if} where should i put the conversion code? Place it at the very bottom after the {/if} Link to comment Share on other sites More sharing options...
martinhandy Posted August 19, 2014 Share Posted August 19, 2014 Thank's mike, but it didn't work.. Link to comment Share on other sites More sharing options...
khejit68 Posted May 6, 2015 Share Posted May 6, 2015 (edited) You have to place it on order-confirmation.tpl and putting the script variables between {literal}{/literal} for ex. <script type="text/javascript"> /* <![CDATA[ */ {literal} var google_conversion_id = 123456789; var google_conversion_language = "en"; var google_conversion_format = "2"; var google_conversion_color = "ffffff"; var google_conversion_label = "AAAAAAAAAAAAAAAAAAA"; var google_conversion_value = 0; {/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/123456789/ ?label=AAAAAAAAAAAAAAAAAAA&guid=ON&script=0"/> </div> </noscript> That, of course, is for a macro conversion (a purchase on your site). then you also have micro conversions, for example a registration or generating a new cart, a call (lead) which you can also track as goal on Analytics or micro-conversion on Adwords Why did you set up google_conversion_value to 0 ? Google's suggested php implementation looks like this: <!-- Kod Google na stronę konwersji zakupowej --> <script type="text/javascript"> /* <![CDATA[ */ var google_conversion_id = 1234567890; var google_conversion_language = "pl_PL"; var google_conversion_format = "1"; var google_conversion_color = "666666"; var google_conversion_label = "xxx-XXx1xXXX123X1xX"; var google_conversion_value = 10; //strike through! if (<? echo $totalValue ?>) { //bold! var google_conversion_value = <? echo $totalValue ?> //bold! var google_conversion_currency = <? echo $currency ?> //bold! } //bold! var google_conversion_currency = "PLN"; //strike through! /* ]]> */ </script> <script type="text/javascript" src="//www.googleadservices.com/pagead/conversion.js"> </script> <noscript> <img height=1 width=1 border=0 src="//www.googleadservices.com/pagead/ conversion/1234567890/?value= <? echo $totalValue ?>&conversion_currency=<? echo $currency ?> &label=Zakup&script=0"> </noscript> </body> but everyone should base on code given to them by google adwords, and then cut out lines which are struck through, and implement proper variables in places which are bold. EDIT: Sorry, I realised that strike-through and bold formatting doesn't work inside code field. It is hard to repair this, so i commented lines :<< On prestashop 1.6 modifications should look like this (for example; works for me): 1. In controllers/front/OrderConfirmationController find: public function initContent() { parent::initContent(); $this->context->smarty->assign(array( 'is_guest' => $this->context->customer->is_guest, 'HOOK_ORDER_CONFIRMATION' => $this->displayOrderConfirmation(), 'HOOK_PAYMENT_RETURN' => $this->displayPaymentReturn() )); and change to: public function initContent() { parent::initContent(); $order = new Order($this->id_order); $currency = new Currency($order->id_currency); $this->context->smarty->assign(array( 'is_guest' => $this->context->customer->is_guest, 'HOOK_ORDER_CONFIRMATION' => $this->displayOrderConfirmation(), 'HOOK_PAYMENT_RETURN' => $this->displayPaymentReturn(), 'name_of_cart_value_variable' => $order->getOrdersTotalPaid(), // name_of_cart_value_variable 'name_of_currency_variable' => $currency->sign // name_of_currency_variable )); 2. Then navigate to themes/YOUR_THEME/order-confirmation.tpl, and after the last {/if} add: <script type="text/javascript"> /* <![CDATA[ */ {literal} var google_conversion_id = 1234567890; //your conversion id given by google! var google_conversion_language = "pl_PL"; //for example. You could put your language sign, or create another variable responsible for this. var google_conversion_format = "1"; //for example var google_conversion_color = "666666"; //example as well var google_conversion_label = "xxx-XXx1xXXX123X1xX"; //your label given by google! if ( {/literal}{$name_of_cart_value_variable}{literal} ) { var google_conversion_value = "{/literal}{$name_of_cart_value_variable}{literal}" var google_conversion_currency = "{/literal}{$name_of_currency_variable}{literal}" } //careful in above lines var google_remarketing_only = false; //for example {/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/1234567890/?value={$name_of_cart_value_variable}&conversion_currency={$name_of_currency_variable}&label=Purchase&script=0"/> //the last two variables here </div> </noscript> You could customize other values send to google adwords, then you should retrieve them in controller. You got the vibe. EDIT: Sorry for poor formatting, it's hard to get rid of code blocks once they had been added. Edited February 12, 2016 by khejit68 (see edit history) 2 Link to comment Share on other sites More sharing options...
EdEichman Posted May 8, 2015 Share Posted May 8, 2015 Hi khejit68, An alternative method to using the GA (Google Analytics) code directly is to use GTM (Google Tag Manager), which handles your GA tracking and conversions, and also makes life much easier when adding more services to your shop. Here are some notes on how to implement this in Prestashop 1.6. My implementation will get even more data into GA than your code (things like shipping costs, products, price per product, etc.)... with fewer changes in your templates (most themes only need a snippet in header.tpl). Thanks, Ed 1 Link to comment Share on other sites More sharing options...
nematodesdirect Posted May 9, 2015 Share Posted May 9, 2015 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) Ensure you have the Prestashop Google Analytics Module installed (my version was - Version : 1.8.1) Now Find the following file: /modules/ganalytics/views/templates/hook/header.tpl Open the header.tpl file in your preferred editor (see appendix 1 below for a view of my file before it was edited) Login to your adwords account and generate your custom conversion tracking code. Paste your Adwords conversion code at the bottom below the closing analytics script tag. (See my example - appendix 2) Change this parameter within your adwords conversion tracking code: var google_conversion_value = {$trans.total}; 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 (Please note: im a bodger, not a developer) Appendix 1 {** 2007-2014 PrestaShop** NOTICE OF LICENSE** This source file is subject to the Academic Free License (AFL 3.0)* that is bundled with this package in the file LICENSE.txt.* It is also available through the world-wide-web at this URL:* http://opensource.org/licenses/afl-3.0.php* If you did not receive a copy of the license and are unable to* obtain it through the world-wide-web, please send an email* to [email protected] so we can send you a copy immediately.** DISCLAIMER** Do not edit or add to this file if you wish to upgrade PrestaShop to newer* versions in the future. If you wish to customize PrestaShop for your* needs please refer to http://www.prestashop.com for more information.** @author PrestaShop SA <[email protected]>* @copyright 2007-2014 PrestaShop SA* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)* International Registered Trademark & Property of PrestaShop SA*}<script type="text/javascript"> {if $universal_analytics eq true} {literal} (function (i, s, o, g, r, a, m) { i['GoogleAnalyticsObject'] = r; i[r] = i[r] || function () { (i[r].q = i[r].q || []).push(arguments) }, i[r].l = 1 * new Date(); a = s.createElement(o), m = s.getElementsByTagName(o)[0]; a.async = 1; a.src = g; m.parentNode.insertBefore(a, m) })(window, document, 'script', '//www.google-analytics.com/analytics.js', 'ga'); {/literal} ga('create', '{$ganalytics_id|escape:'htmlall':'UTF-8'}'{if isset($pageTrack)}, '{$pageTrack|escape:'htmlall':'UTF-8'}'{/if}); {if $isOrder eq true} ga('require', 'ecommerce', 'ecommerce.js'); {else} ga('send', 'pageview'); {/if} {if $isOrder eq true} ga('ecommerce:addTransaction', { 'id': '{$trans.id|escape:'htmlall':'UTF-8'}', 'affiliation': '{$trans.store|escape:'htmlall':'UTF-8'}', 'revenue': '{$trans.total|escape:'htmlall':'UTF-8'}', 'tax': '{$trans.tax|escape:'htmlall':'UTF-8'}', 'shipping': '{$trans.shipping|escape:'htmlall':'UTF-8'}', 'city': '{$trans.city|escape:'htmlall':'UTF-8'}', 'state': '{$trans.state|escape:'htmlall':'UTF-8'}', 'country': '{$trans.country|escape:'htmlall':'UTF-8'}', 'currency': '{$trans.currency|escape:'htmlall':'UTF-8'}' }); {foreach from=$items item=item} ga('ecommerce:addItem', { 'id': '{$item.OrderId|escape:'htmlall':'UTF-8'}', 'sku': '{$item.SKU|escape:'htmlall':'UTF-8'}', 'name': '{$item.Product|escape:'htmlall':'UTF-8'}', 'category': '{$item.Category|escape:'htmlall':'UTF-8'}', 'price': '{$item.Price|escape:'htmlall':'UTF-8'}', 'quantity': '{$item.Quantity|escape:'htmlall':'UTF-8'}' }); {/foreach} {literal} (function() { {/literal}{if $isOrder eq true}{literal} var key = 'ga_trans'; var idtrans = {/literal}{$trans.id|intval}{literal}; if (!!$.prototype.totalStorage) var view_ga_trans = parseInt($.totalStorage(key)); else if (typeof localStorage !== 'undefined' && localStorage) var view_ga_trans = parseInt(localStorage.getItem(key)); if (typeof view_ga_trans !== 'undefined' && view_ga_trans > 0 && idtrans == view_ga_trans ) return false; if (!!$.prototype.totalStorage) $.totalStorage(parseInt(key, idtrans)); else if (typeof localStorage !== 'undefined' && localStorage) localStorage.setItem(key, parseInt(idtrans)); {/literal}{/if}{literal} ga('ecommerce:send'); })(); {/literal} {/if} {else} var _gaq = _gaq || []; _gaq.push(['_setAccount', '{$ganalytics_id|escape:'htmlall':'UTF-8'}']); // Recommended value by Google doc and has to before the trackPageView _gaq.push(['_setSiteSpeedSampleRate', 5]); _gaq.push(['_trackPageview'{if isset($pageTrack)}, '{$pageTrack|escape:'htmlall':'UTF-8'}'{/if}]); {if $isOrder eq true} {* If it's an order we need more data for stats *} _gaq.push(['_addTrans', '{$trans.id|escape:'htmlall':'UTF-8'}', {* order ID - required *} '{$trans.store|escape:'htmlall':'UTF-8'}', {* affiliation or store name *} '{$trans.total|escape:'htmlall':'UTF-8'}', {* total - required *} '{$trans.tax|escape:'htmlall':'UTF-8'}', {* tax *} '{$trans.shipping|escape:'htmlall':'UTF-8'}', {* shipping *} '{$trans.city|escape:'htmlall':'UTF-8'}', {* city *} '{$trans.state|escape:'htmlall':'UTF-8'}', {* state or province *} '{$trans.country|escape:'htmlall':'UTF-8'}' {* country *} ]); {foreach from=$items item=item} _gaq.push(['_addItem', '{$item.OrderId|escape:'htmlall':'UTF-8'}', {* order ID - required *} '{$item.SKU|escape:'htmlall':'UTF-8'}', {* SKU/code - required *} '{$item.Product|escape:'htmlall':'UTF-8'}', {* product name *} '{$item.Category|escape:'htmlall':'UTF-8'}', {* category or variation *} '{$item.Price|escape:'htmlall':'UTF-8'}', {* unit price - required *} '{$item.Quantity|escape:'htmlall':'UTF-8'}' {* quantity - required *} ]); {/foreach} {* submits transaction to the Analytics servers *} {literal} _gaq.push(['_trackTrans']); {/literal} {/if} {literal} (function() { {/literal}{if $isOrder eq true}{literal} var key = 'ga_trans'; var idtrans = {/literal}{$trans.id|intval}{literal}; if (!!$.prototype.totalStorage) var view_ga_trans = parseInt($.totalStorage(key)); else if (typeof localStorage !== 'undefined' && localStorage) var view_ga_trans = parseInt(localStorage.getItem(key)); if (typeof view_ga_trans !== 'undefined' && view_ga_trans > 0 && idtrans == view_ga_trans ) return false; if (!!$.prototype.totalStorage) $.totalStorage(parseInt(key, idtrans)); else if (typeof localStorage !== 'undefined' && localStorage) localStorage.setItem(key, parseInt(idtrans)); {/literal}{/if}{literal} var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); })(); {/literal} {/if}</script> Appendix 2: (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 = {$trans.total};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 --> Link to comment Share on other sites More sharing options...
leozao Posted May 24, 2015 Share Posted May 24, 2015 Hello all, I am using PS 1.6.0.14. I have inserted the code AdWords in order-confirmation.tpl, at the end of file, after {/if}, as someone wrote here few posts before, but this does not work for me, the conversions are not reported. I have tested it with Tag Assistant by Google in Chrome and the reported error was "No HTTP response detected". So, seams that inserting the AsWords trancking code in the order-confirmation.tpl is not working. As for the solution of nematodesdirect, is there anybody which did test it on PS 1.6.0.14? IS it working in this version? Anyway, if this is working, it will report all the conversions, not only when an order is finished. Tks to all... Link to comment Share on other sites More sharing options...
ianm Posted June 18, 2015 Share Posted June 18, 2015 Hi, I received the following message from google "So how conversion tracking works in Adwords is when you implement the adwords conversion tracking code on your checkout complete page or "thank you" page then every time a customer clicks your Adwords ad on Google.com or selected Google Network sites, a temporary cookie is placed on the customer's device so a conversion can be recorded when the customer reaches the conversion page and your conversion tracking code is executed so this tracks your conversion and reports it in to your adwords account. Here is a helpful video explaining conversion tracking too : https://youtu.be/TgNI5Yavdig If you are already using Google Analytics on the site you should consider setting up a Goal instead as this will run off your existing google analytics code so no modification would be required to the site. then once you have linked your adwords and analytics account you can import the adwords goals from analytics. More information on Goals can be found here: https://support.google.com/analytics/answer/1012040?hl=en And for information on Goal creation please see this link: https://support.google.com/analytics/answer/1032415 1 Link to comment Share on other sites More sharing options...
trevorgilligan Posted April 12, 2016 Share Posted April 12, 2016 thanks @khejit68 & @anitam . i have copied in code and have analytics set up. so i think i have the google_conversion_value set up. google tag manager says it isnt working but i think that its because the script code is not in the header. is this correct? is there a way to use google analytics to include: google_conversion_value so that the conversion is set up in google analytics and i can put in the variable: google_conversion_value?? thank you. Link to comment Share on other sites More sharing options...
Ramesh R Posted January 29, 2017 Share Posted January 29, 2017 Do i need to view page source before going to payment gateway page to confirm whether google adWords script is there or not? Link to comment Share on other sites More sharing options...
Aquis President Posted February 11, 2017 Share Posted February 11, 2017 (edited) Sorry but i have the same probleme: (Prestashp 1.6) I got 2 Codes from Google to add 1) Tracking Code: <script> (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) })(window,document,'script','https://www.google-analytics.com/analytics.js,ga'); ga('create', 'XXXXXXXXXXXX', 'auto'); ga('send', 'pageview');</script> 2) DNS Text:<meta name="google-site-verification" content="XXXXXXXXXXXXXXXXXXXXXXXXXXX" /> Where and how do i add both of them (or in diffent files)? I hope you can help me, 10 houres i am trying - nothing!! greetings Mike Edited February 11, 2017 by Aquis President (see edit history) Link to comment Share on other sites More sharing options...
kaferklaus Posted March 22, 2019 Share Posted March 22, 2019 Hi, in Prestashop 1.7.2.2 I'm trying to set the "add to cart" as a conversion on GoogleAds. After having added the snippet in the <head> I also added the code to the button (trying the two ways below) but the clicks are not detected. Where am I wrong?https://support.google.com/google-ads/answer/6331304?hl=it <button onclick = "goog_report_conversion ()" class = "button-action slide-button" action-button-data = "add-to-cart" type = "submit" {if! $ product.quantity} disabled {/ if} > <button onclick = "goog_report_conversion (ls = 'Add to cart')" class = "button-action slide-button" data-button-action = "add-to-cart" type = "submit" {if! $ product. quantity disabled} {/ if}> Thank you K 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