biox90 Posted June 29, 2014 Share Posted June 29, 2014 Hello guys I was hoping someone could tell me where to put this code i got from adwords to track conversion? I think someone said order.confirmation.tpl. But where exaclty ? Link to comment Share on other sites More sharing options...
vekia Posted June 29, 2014 Share Posted June 29, 2014 what kind of code you have to implement? this code contains some variables? everything depends on it! Link to comment Share on other sites More sharing options...
biox90 Posted June 29, 2014 Author Share Posted June 29, 2014 (edited) It looks like this. I would really appreciate if you could tell me where to put this one exactly <!-- Google Code for asasd Conversion Page --> <script type="text/javascript"> /* <![CDATA[ */ var google_conversion_id = 96748663; var google_conversion_language = "en"; var google_conversion_format = "2"; var google_conversion_color = "ffffff"; var google_conversion_label = "HnDtCMur3hgjkg2PzQM"; 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/967051253/?label=HnDtCMjkljkl7Z2PzQM&guid=ON&script=0"/> </div> </noscript> Edited June 29, 2014 by biox90 (see edit history) Link to comment Share on other sites More sharing options...
vekia Posted June 30, 2014 Share Posted June 30, 2014 if i were you i will add this code: $this->context->smarty->assign(array('order_created'=>1)); to .contorllers/front/orderConfirmationController.php inside: public function initContent() { funciton then in theme file, for example header.tpl add this code: {if isset($order_created)} {if $order_created==1} <!-- Google Code for asasd Conversion Page --> <script type="text/javascript"> /* <![CDATA[ */ var google_conversion_id = 96748663; var google_conversion_language = "en"; var google_conversion_format = "2"; var google_conversion_color = "ffffff"; var google_conversion_label = "HnDtCMur3hgjkg2PzQM"; 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/967051253/?label=HnDtCMjkljkl7Z2PzQM&guid=ON&script=0"/> </div> </noscript> {/if} {/if} Link to comment Share on other sites More sharing options...
biox90 Posted June 30, 2014 Author Share Posted June 30, 2014 (edited) Thanks Vekia! Will this be ok? public function initContent() { $this->context->smarty->assign(array('order_created'=>1)); parent::initContent(); $this->context->smarty->assign(array( 'is_guest' => $this->context->customer->is_guest, 'HOOK_ORDER_CONFIRMATION' => $this->displayOrderConfirmation(), 'HOOK_PAYMENT_RETURN' => $this->displayPaymentReturn() ...... ?? Edited June 30, 2014 by biox90 (see edit history) Link to comment Share on other sites More sharing options...
vekia Posted June 30, 2014 Share Posted June 30, 2014 you can use method you pasted above, everything is allright there 1 Link to comment Share on other sites More sharing options...
biox90 Posted July 2, 2014 Author Share Posted July 2, 2014 you can use method you pasted above, everything is allright there Still not working, been waiting for 2 days and adwords says "not verified" in the conversion section? Any clue why this is happening? Link to comment Share on other sites More sharing options...
vekia Posted July 3, 2014 Share Posted July 3, 2014 create test order, and on order confirmation page check if code you defined appears there to see page source press ctrl+U Link to comment Share on other sites More sharing options...
biox90 Posted July 3, 2014 Author Share Posted July 3, 2014 create test order, and on order confirmation page check if code you defined appears there to see page source press ctrl+U I checked and it does show. here is a little of the code that shows var google_conversion_id = 967036653; var google_conversion_language = "en"; var google_conversion_format = "2"; var google_conversion_color = "ffffff"; var google_conversion_label = "aQFuCJvt3wkQ7Z2PzQM"; var google_conversion_value = 1.000000; var google_remarketing_only = false; /* ]]> */ (function (i, s, o, g, r, a, m) { i['GoogleAnalyticsObject'] = r; i[r] = i[r] || function () { What could be the problem? Link to comment Share on other sites More sharing options...
NemoPS Posted July 4, 2014 Share Posted July 4, 2014 I would create a module and hook it to order confirmation. Get the variables you need from the php hook, and assign them to the template, where you will display js I did it countless time, always worked (with google's too) Link to comment Share on other sites More sharing options...
vekia Posted July 4, 2014 Share Posted July 4, 2014 I checked and it does show. here is a little of the code that shows var google_conversion_id = 967036653; var google_conversion_language = "en"; var google_conversion_format = "2"; var google_conversion_color = "ffffff"; var google_conversion_label = "aQFuCJvt3wkQ7Z2PzQM"; var google_conversion_value = 1.000000; var google_remarketing_only = false; /* ]]> */ (function (i, s, o, g, r, a, m) { i['GoogleAnalyticsObject'] = r; i[r] = i[r] || function () { What could be the problem? this is all what you've got? no <script> markup etc. ? what ps version? 1.6.0.7 / 1.6.0.8 ? Link to comment Share on other sites More sharing options...
biox90 Posted July 5, 2014 Author Share Posted July 5, 2014 this is all what you've got? no <script> markup etc. ? what ps version? 1.6.0.7 / 1.6.0.8 ? Got version 1.6.0.7 Strange got no <script>, not showing the way i wrote it in the FTP file header.tpl What could be wrong? Link to comment Share on other sites More sharing options...
vekia Posted July 6, 2014 Share Posted July 6, 2014 check if purifier is enabled - if so - disable it go to preferences > general (there is an option to manage HTML purifier) what's going on then? Link to comment Share on other sites More sharing options...
biox90 Posted July 6, 2014 Author Share Posted July 6, 2014 check if purifier is enabled - if so - disable it go to preferences > general (there is an option to manage HTML purifier) what's going on then? Thanks man, but it is already disabled :S Link to comment Share on other sites More sharing options...
Recommended Posts