mma87 Posted May 13, 2014 Share Posted May 13, 2014 Hi to all! google has update new remarketing tag script and I'm tring to integrate it with prestashop. the prestashop version currently I'm using is 1.4 after some tests and I disabled the ccc compression and I insert the code above (that work fine) {literal} <script type="text/javascript"> var google_tag_params = { ecomm_prodid: '{/literal}{$product->id|intval}{literal}', ecomm_pagetype: 'product', ecomm_totalvalue: '{/literal}{$product->getPrice(true, $smarty.const.NULL, 2)}{literal}', }; </script> {/literal} <script type="text/javascript"> {literal} /* <![CDATA[ */ var google_conversion_id = 995392743; var google_custom_params = window.google_tag_params; var google_remarketing_only = true; google_conversion_format = 3; /* ]]> */ {/literal} </script> {literal}<script type="text/javascript" src="//www.googleadservices.com/pagead/conversion.js"> </script>{/literal} {literal} <noscript>{/literal} <div style="display:inline;"> <img height="1" width="1" style="border-style:none;" alt="" src="//googleads.g.doubleclick.net/pagead/viewthroughconversion/995392743/?value=0&guid=ON&script=0"/> </div>{literal} </noscript> {/literal} the code have to be insert before the </body> in the footer.tpl you can see an example in this page there is only one problem: ecomm_pagetype is static because I can't find the way to understand using smarty what kind of page the user are visiting. If some one know how to find it, we can improve my solution (in the db there is the table ps_page_type) Matteo 2 Link to comment Share on other sites More sharing options...
Tia© Posted September 15, 2014 Share Posted September 15, 2014 Hi, have you found a solution about the page type? Link to comment Share on other sites More sharing options...
mma87 Posted September 15, 2014 Author Share Posted September 15, 2014 yep! chage the line 5 whit this code: ecomm_pagetype: '{/literal}{if $page_name eq "index"}home{elseif $page_name eq "category"}category{elseif $page_name eq "product"}product{else}other{/if}{literal}', Matteo 2 Link to comment Share on other sites More sharing options...
Tia© Posted September 15, 2014 Share Posted September 15, 2014 Thank you very much, i am watching also this topic http://www.prestashop.com/forums/topic/314154-remarketing-google-prestashop-15/ Scrivo in inglese e probabilmente siamo due italiani 2 Link to comment Share on other sites More sharing options...
mma87 Posted September 15, 2014 Author Share Posted September 15, 2014 you're welcome! si, siamo due italiani 3 Link to comment Share on other sites More sharing options...
Mizi91 Posted December 2, 2015 Share Posted December 2, 2015 Thank you for your solution. I get error 500 after changing it in my footer.tpl Anyone experienced same problem? Link to comment Share on other sites More sharing options...
mma87 Posted December 2, 2015 Author Share Posted December 2, 2015 Thank you for your solution. I get error 500 after changing it in my footer.tpl Anyone experienced same problem? do you use this solution with prestashop 1.4? maybe your issue is with copy-paste? Link to comment Share on other sites More sharing options...
Recommended Posts