xasdown Posted February 3, 2018 Share Posted February 3, 2018 Hi there people, i am just starting prestashop and i am currently building a website in prestashop version 1.7 and currently i am trying to install facebook pixel on my website, first question: 1 - Is there any free module to instal in prestashop 1.7 that allows direct implementation on the website, like it's done in woocommerce? 2 - If there is no free module where should i insert the code to track pepople who buy products? (To build a lookalike audience for targeting.) Thanks in advance and best regards. Link to comment Share on other sites More sharing options...
Rhobur Posted February 10, 2018 Share Posted February 10, 2018 Not sure if there is a free PS1.7 module but this one https://mypresta.eu/modules/social-networks/fb-conversion-tracking-pixel.html is only 10 eur. Anyway, the pixel should be added to confirmation.tpl called in the order confirmation page. Link to comment Share on other sites More sharing options...
kacifashionuk Posted February 23, 2018 Share Posted February 23, 2018 Maybe the following will be of use? https://addons.prestashop.com/en/products-on-facebook-social-networks/27646-official-pixel-facebook.html Link to comment Share on other sites More sharing options...
Ionathan Posted February 2, 2020 Share Posted February 2, 2020 I added facebook pixel stript in themes/mytheme/templates/_partials/javascript.tpl like this and it works: {foreach $javascript.external as $js} <script type="text/javascript" src="{$js.uri}" {$js.attribute}></script> {/foreach} {foreach $javascript.inline as $js} <script type="text/javascript"> {$js.content nofilter} </script> {/foreach} {if isset($vars) && $vars|@count} <script type="text/javascript"> {foreach from=$vars key=var_name item=var_value} var {$var_name} = {$var_value|json_encode nofilter}; {/foreach} </script> {/if} {literal} <!-- Facebook Pixel Code --> <script> !function(f,b,e,v,n,t,s) {if(f.fbq)return;n=f.fbq=function(){n.callMethod? n.callMethod.apply(n,arguments):n.queue.push(arguments)}; if(!f._fbq)f._fbq=n;n.push=n;n.loaded=!0;n.version='2.0'; n.queue=[];t=b.createElement(e);t.async=!0; t.src=v;s=b.getElementsByTagName(e)[0]; s.parentNode.insertBefore(t,s)}(window, document,'script', 'https://connect.facebook.net/en_US/fbevents.js'); fbq('init', 'mypixelnumber'); fbq('track', 'PageView'); </script> <noscript><img height="1" width="1" style="display:none" src="https://www.facebook.com/tr?id=myidnumber=PageView&noscript=1" /></noscript> <!-- End Facebook Pixel Code --> {/literal} 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