JuanLaSambuca Posted November 17, 2012 Share Posted November 17, 2012 Hi guys, I'm trying to install the Adroll pixel in my website but when I add it into footer.tpl (as for example the GA Script) it makes the footer and some areas to disappear. The code is this <script type="text/javascript"> adroll_adv_id = "BDPQAKSV7VCTNJ22FSOUGM"; adroll_pix_id = "JRE43QD62ZAZPP3GL7IHWQ"; (function () { var oldonload = window.onload; window.onload = function(){ __adroll_loaded=true; var scr = document.createElement("script"); var host = (("https:" == document.location.protocol) ? "https://s.adroll.com" : "http://a.adroll.com"); scr.setAttribute('async', 'true'); scr.type = "text/javascript"; scr.src = host + "/j/roundtrip.js"; ((document.getElementsByTagName('head') || [null])[0] || document.getElementsByTagName('script')[0].parentNode).appendChild(scr); if(oldonload){oldonload()[spam-filter]; }()); </script> Has anybody tried to install it as well? Any help? Thanks in advance, Link to comment Share on other sites More sharing options...
SamG Posted November 20, 2012 Share Posted November 20, 2012 Hey JuanLaSambuca, I work at AdRoll and thought I'd try to help out. In order for prestashop to successfully read the javascript you've added, I believe you need to embed it within {litearl} {/literal}. It should look like below: {literal} <script type="text/javascript"> adroll_adv_id = "BDPQAKSV7VCTNJ22FSOUGM"; adroll_pix_id = "JRE43QD62ZAZPP3GL7IHWQ"; (function () { var oldonload = window.onload; window.onload = function(){ __adroll_loaded=true; var scr = document.createElement(" script"); var host = (("https:" == document.location.protocol) ? "https://s.adroll.com" : "http://a.adroll.com"); scr.setAttribute('async', 'true'); scr.type = "text/javascript"; scr.src = host + "/j/roundtrip.js"; ((document.getElementsByTagName('head') || [null])[0] || document.getElementsByTagName('script')[0].parentNode).appendChild(scr); if(oldonload){oldonload()[spam-filter]; }()); </script> {/literal} Hope this helps! Link to comment Share on other sites More sharing options...
JuanLaSambuca Posted November 21, 2012 Author Share Posted November 21, 2012 Hi SamG, Thanks for this :-) Where do you think should I include this code? I mean in which file should I paste this code if what I want to show users (Retargeting) are the product they have add to the cart? I guess if my goal is to re-show them any product they have checked, I should paste it on product.tpl. Is that right? thanks in advance Link to comment Share on other sites More sharing options...
JuanLaSambuca Posted November 21, 2012 Author Share Posted November 21, 2012 Actually I tried it and it still doesn't work. I've pasted in footer.tpl right before the </body> tag. Any suggestions? Link to comment Share on other sites More sharing options...
wiso Posted November 20, 2013 Share Posted November 20, 2013 JuanLaSambuca Have you found a solution of where include the code ? Link to comment Share on other sites More sharing options...
vekia Posted November 20, 2013 Share Posted November 20, 2013 On 11/20/2013 at 8:44 AM, wiso said: JuanLaSambuca Have you found a solution of where include the code ? use this code: {literal} <script type="text/javascript"> adroll_adv_id = "BDPQAKSV7VCTNJ22FSOUGM"; adroll_pix_id = "JRE43QD62ZAZPP3GL7IHWQ"; (function () { var oldonload = window.onload; window.onload = function(){ __adroll_loaded=true; var scr = document.createElement(" script"); var host = (("https:" == document.location.protocol) ? "https://s.adroll.com" : "http://a.adroll.com"); scr.setAttribute('async', 'true'); scr.type = "text/javascript"; scr.src = host + "/j/roundtrip.js"; ((document.getElementsByTagName('head') || [null])[0] || document.getElementsByTagName('script')[0].parentNode).appendChild(scr); if(oldonload){oldonload()[spam-filter]; }()); </script> {/literal} paste it into the header.tpl file located in your theme directory Link to comment Share on other sites More sharing options...
elkup Posted January 27, 2014 Share Posted January 27, 2014 Hi! Have same "problem", where to paste in header.tpl ? Thanks in advance. Link to comment Share on other sites More sharing options...
vekia Posted January 27, 2014 Share Posted January 27, 2014 between <head></head> tags Link to comment Share on other sites More sharing options...
elkup Posted January 28, 2014 Share Posted January 28, 2014 Thanks :-) Link to comment Share on other sites More sharing options...
CloniKa Posted July 11, 2014 Share Posted July 11, 2014 On 1/27/2014 at 4:55 PM, vekia said: between <head></head> tags Hi, please. I have the same problem, it doesn´t work for me! Thanks Link to comment Share on other sites More sharing options...
vekia Posted July 11, 2014 Share Posted July 11, 2014 what you mean by doesnt work? whats going on? Link to comment Share on other sites More sharing options...
matbumann Posted September 25, 2014 Share Posted September 25, 2014 any news regarding the prestashop pixel?! got that html block modul but can't figure it out where to insert the code... Has somebody been successful?! Link to comment Share on other sites More sharing options...
naxifegar Posted October 13, 2014 Share Posted October 13, 2014 For me it worked in the header.tpl see attached screenshot: http://prntscr.com/4vs92x Thanks so much Link to comment Share on other sites More sharing options...
Xinito87 Posted November 21, 2014 Share Posted November 21, 2014 Hi, Please I have the same problem and appear some issues every time I try to implement the Pixel of Adroll. I get this erro. Fatal error: Uncaught exception 'SmartyCompilerException' with message 'Syntax Error in template "/home/topminer/public_html/themes/leotrac/header.tpl" on line 48 "if(oldonload){oldonload()[spam-filter];" unknown function "oldonload"' in /home/topminer/public_html/tools/smarty/sysplugins/smarty_internal_templatecompilerbase.php:667 Stack trace: #0 /home/topminer/public_html/tools/smarty/sysplugins/smarty_internal_templateparser.php(2900): Smarty_Internal_TemplateCompilerBase->trigger_template_error('unknown functio...') #1 /home/topminer/public_html/tools/smarty/sysplugins/smarty_internal_templateparser.php(3101): Smarty_Internal_Templateparser->yy_r153() #2 /home/topminer/public_html/tools/smarty/sysplugins/smarty_internal_templateparser.php(3201): Smarty_Internal_Templateparser->yy_reduce(153) #3 /home/topminer/public_html/tools/smarty/sysplugins/smarty_internal_smartytemplatecompiler.php(105): Smarty_Internal_Templateparser->doParse(17, '}') #4 /home/topminer/public_html/tools/smarty/sysplugins/smar in /home/topminer/public_html/tools/smarty/sysplugins/smarty_internal_templatecompilerbase.php on line 667 Someone can help? :s Thanks. Link to comment Share on other sites More sharing options...
vekia Posted November 22, 2014 Share Posted November 22, 2014 On 11/21/2014 at 8:29 AM, Xinito87 said: Hi, Please I have the same problem and appear some issues every time I try to implement the Pixel of Adroll. I get this erro. Fatal error: Uncaught exception 'SmartyCompilerException' with message 'Syntax Error in template "/home/topminer/public_html/themes/leotrac/header.tpl" on line 48 "if(oldonload){oldonload()[spam-filter];" unknown function "oldonload"' in /home/topminer/public_html/tools/smarty/sysplugins/smarty_internal_templatecompilerbase.php:667 Stack trace: #0 /home/topminer/public_html/tools/smarty/sysplugins/smarty_internal_templateparser.php(2900): Smarty_Internal_TemplateCompilerBase->trigger_template_error('unknown functio...') #1 /home/topminer/public_html/tools/smarty/sysplugins/smarty_internal_templateparser.php(3101): Smarty_Internal_Templateparser->yy_r153() #2 /home/topminer/public_html/tools/smarty/sysplugins/smarty_internal_templateparser.php(3201): Smarty_Internal_Templateparser->yy_reduce(153) #3 /home/topminer/public_html/tools/smarty/sysplugins/smarty_internal_smartytemplatecompiler.php(105): Smarty_Internal_Templateparser->doParse(17, '}') #4 /home/topminer/public_html/tools/smarty/sysplugins/smar in /home/topminer/public_html/tools/smarty/sysplugins/smarty_internal_templatecompilerbase.php on line 667 Someone can help? :s Thanks. do you use {literal} {/literal} tags to prevent interpreting brackets as a smarty syntax? Link to comment Share on other sites More sharing options...
ItalianBoutiqueShoes Posted August 10, 2015 Share Posted August 10, 2015 (edited) I have add it to general.js file on theme/js folder. It seams to work correctly :-) Edited August 10, 2015 by ItalianBoutiqueShoes (see edit history) Link to comment Share on other sites More sharing options...
ItalianBoutiqueShoes Posted August 26, 2015 Share Posted August 26, 2015 It seams that AdRoll is not able to track some conversion pages like PayPal. Where I can be sure to locate this code so that all pages load it? Thanks! Link to comment Share on other sites More sharing options...
vekia Posted August 30, 2015 Share Posted August 30, 2015 in this case it will be necessary to add it to paypal confirmation page too. Paypal confirmation page is a page what you see right after you are redirected to from paypal payment gateway Link to comment Share on other sites More sharing options...
ItalianBoutiqueShoes Posted August 30, 2015 Share Posted August 30, 2015 Thanks Vekia, I did it but unfortunatelly seams that the same page, with different parameters are loaded from PayPal modules also for other purposes so the Target stats are incorrect. Then all modules are different and use different confirmation pages and some of them don't load any html code so is impossible to track them. It is really creazy that there is not a standard confirmation page for all modules that can be tracked. 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