inveostore.com Posted January 10, 2011 Share Posted January 10, 2011 I see a lot of threads here about how to make Google Adwords Conversions (and Google Analytics if connected) work with PayPal but no solution which will work for 100% was posted yet even thought it is quite simple:Open modules/paypal/standard/redirect.tpl or modules/paypal/redirect.tpl (depends on PayPal module version) and add the code in attached file before </body> tag:(IMPORTANT: replace XXXXXXXX with your Google Conversion ID - you can get one in your Google AdWords Account under Reports - Conversions.Save, close and upload to your FTP (test purchase is also recommended to make sure you did everything correctly).Now all your purchases via PayPal which came via AdWords will shown in Google Adwords as conversion and the conversion value will correspond to order total cost in your store (NOTE: code you see above is not ready for multiple currencies - it means 10 EUR and 10 USD will be counted as the same value, but with little changes other currencies may be added).NOTE: This will not work if you are using PayPal API credentials (but it does not break anything).Feedback is welcome!UPDATE 1: It is also recommeded to replace: $(document).ready(function() { with $(window).load(function() { (it will ensure code is executed)UPDATE 2: Dynamic HTTP & HTTPS support added paypal-conversion.txtFetching info... Link to comment Share on other sites More sharing options...
JamieL Posted January 13, 2011 Share Posted January 13, 2011 Hi Inveostore, Will this code track ALL sales made on a website as Adwords conversions. I'm interested in tracking Only sales made through actual Adwords efforts.Thanks in advance for your reply. Link to comment Share on other sites More sharing options...
inveostore.com Posted January 13, 2011 Author Share Posted January 13, 2011 This code will properly records AdWords conversions (orders made by customers which came to your site via AdWords).I am not sure if you know how AdWords conversion code works, but its code NEED to be executed by every single customer when making an order (AdWords then detect whether it is a AdWords conversion or not). Link to comment Share on other sites More sharing options...
inveostore.com Posted January 13, 2011 Author Share Posted January 13, 2011 Update 1 posted. Link to comment Share on other sites More sharing options...
noesac Posted January 24, 2011 Share Posted January 24, 2011 Is the $(window).load(function() { change safe to make? Link to comment Share on other sites More sharing options...
inveostore.com Posted January 24, 2011 Author Share Posted January 24, 2011 It is not only safe, but required. Otherwise jQuery does not wait until external JS is loaded and conversion may be lost. Link to comment Share on other sites More sharing options...
noesac Posted January 25, 2011 Share Posted January 25, 2011 Great thanks. By the way I also tried putting the code before the </head> tag, instead of the </body> tag and it still worked. Does this sound ok to you? Link to comment Share on other sites More sharing options...
inveostore.com Posted January 25, 2011 Author Share Posted January 25, 2011 Yes. It will work on both places fine. Link to comment Share on other sites More sharing options...
inveostore.com Posted January 29, 2011 Author Share Posted January 29, 2011 Update 2 posted. Link to comment Share on other sites More sharing options...
devo Posted January 29, 2011 Share Posted January 29, 2011 Hi Inveostore,it´s sounds well, thanks... Please do you know if it´s work also with another payments? Important for me is modules COD – Cash on delivery or CODWF – Cash on delivery with fee. D Link to comment Share on other sites More sharing options...
inveostore.com Posted January 29, 2011 Author Share Posted January 29, 2011 It will work. You will need to place the code to modules/cashondelivery/validation.tpl file and replace $amount with $total.The better would be to place the code to modules/cashondelivery/confirmation.tpl file but with no extra modifications there is no way how to get amount paid ($total var is not available there).However, COD is offline payment method. I am not sure if stats data you get will show the reality... Link to comment Share on other sites More sharing options...
devo Posted January 29, 2011 Share Posted January 29, 2011 Thanks, inveostore, very much! So, I am using two modules for payments 1) bankwire (files payment.php or payment.tpl) and 2) cashondeliverywithfee (files validation.php or validation.tpl). Please, is it necessary to place TWO codes (two Google Conversion IDs) to each of these modules? Or - is it possible to place ONE code to the final page (order-confirmation.php or order-confirmation.tpl)?(In my validation.tpl is using $total)Thanks in advance for your reply. Link to comment Share on other sites More sharing options...
noesac Posted February 2, 2011 Share Posted February 2, 2011 Hi, what does your "Update 2" do? Link to comment Share on other sites More sharing options...
inveostore.com Posted February 2, 2011 Author Share Posted February 2, 2011 It detects request type (HTTP/HTTPS) and then use HTTP or HTTPS for GA file with JS which match request type. Link to comment Share on other sites More sharing options...
noesac Posted February 2, 2011 Share Posted February 2, 2011 Ok, if I don't upgrade my code what will be the impact? Link to comment Share on other sites More sharing options...
inveostore.com Posted February 2, 2011 Author Share Posted February 2, 2011 Can not tell you. We haven't been experienced any problems with old code. This update is just to avoid problems which may occurs when page contains HTTP content when requested via HTTPS. Updating is quick and easy so I recommend to upgrade. Link to comment Share on other sites More sharing options...
noesac Posted February 2, 2011 Share Posted February 2, 2011 Great thanks I'll try it when I get home Link to comment Share on other sites More sharing options...
texxo Posted April 3, 2011 Share Posted April 3, 2011 Quote Thanks, inveostore, very much! So, I am using two modules for payments 1) bankwire (files payment.php or payment.tpl) and 2) cashondeliverywithfee (files validation.php or validation.tpl). Please, is it necessary to place TWO codes (two Google Conversion IDs) to each of these modules? Or - is it possible to place ONE code to the final page (order-confirmation.php or order-confirmation.tpl)?(In my validation.tpl is using $total)Thanks in advance for your reply. Devo, did you manage to make it work with CashOnDelivery?If yes, can you post here exactly what you did? It would help me a lot lot!I tried in the past to put in the order-confirmation files but somehow it was "breaking" the page and nothing was showed. Link to comment Share on other sites More sharing options...
devo Posted April 5, 2011 Share Posted April 5, 2011 Texxo, I am sorry, I did not manage it. I am still without Google Adwords Conversions. Please - if you find a solution, you post it! It would help me very much!;-). Link to comment Share on other sites More sharing options...
vampirito Posted June 7, 2011 Share Posted June 7, 2011 If a want to put google conversion code adwords in Registration form, what is the file i have to use??? Link to comment Share on other sites More sharing options...
devo Posted June 7, 2011 Share Posted June 7, 2011 I need to know it also. Please could anybody help? Link to comment Share on other sites More sharing options...
afilth Posted June 27, 2011 Share Posted June 27, 2011 Quote If a want to put google conversion code adwords in Registration form, what is the file i have to use??? I´m interested in that too. Anybody knowns which is the file that we have to paste the code inside? Link to comment Share on other sites More sharing options...
Alexis44 Posted December 5, 2011 Share Posted December 5, 2011 Thanks for this solution, I will test in few hours.A And, how to do for cheque and transfer please ? Thanks Link to comment Share on other sites More sharing options...
dzindzilia Posted December 23, 2011 Share Posted December 23, 2011 Hi, I am using bank transfer payment only. Does anybody have an idea where to put AdWords conversion code, that it would count a conversion ONLY when e-shop administrator changes order status to "payment received"? Link to comment Share on other sites More sharing options...
korvins Posted January 9, 2012 Share Posted January 9, 2012 I really do not understand why this should work... It is placed in the redirect page which it seems executed while redirecting to the payment page, at the beginning not at the end. How can you be sure that it the person has paid if you count the purchase before it was made? 1 Link to comment Share on other sites More sharing options...
need4speed Posted February 8, 2012 Share Posted February 8, 2012 Im looking for a solution too. I havent tried it yet but I think we need to set a callback URL inside our paypal account. So after a succesfull payment the customer will return to the callball URL where the convert code is inserted. Just an idea Link to comment Share on other sites More sharing options...
chrisdata Posted April 3, 2012 Share Posted April 3, 2012 Any updates with this? This is a very important thing to do before anything else in-order to get sales to our e-store. I can't believe Prestashop had NO solution to it yet in year 2012. Unbeliveable! 1 Link to comment Share on other sites More sharing options...
kikbo Posted June 29, 2012 Share Posted June 29, 2012 Yeah can anyone explain how this works? Link to comment Share on other sites More sharing options...
kikbo Posted July 7, 2012 Share Posted July 7, 2012 Fuck this redirect.tpl solution - it doesn't make sense. Paste the conversions code into order-confirmation.tpl (it works for me) Link to comment Share on other sites More sharing options...
soniceb Posted August 29, 2012 Share Posted August 29, 2012 On 7/7/2012 at 6:35 PM, kikbo said: Fuck this redirect.tpl solution - it doesn't make sense. Paste the conversions code into order-confirmation.tpl (it works for me) Did you put the google code as is? <!-- Google Code for TEST Conversion Page --> <script type="text/javascript"> ... Or between tags? Link to comment Share on other sites More sharing options...
Recommended Posts