Niller Posted July 6, 2016 Share Posted July 6, 2016 Hello Prestashoppers. I have this facebook pixel: How do i get the right ID and PRICE in the pixel, so i can make dynamic ads? <!-- Facebook Pixel Code --> {literal} <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', 'PIXELID'); fbq('track', "PageView"); fbq('track', 'ViewContent', { content_type: 'product', //either 'product' or 'product_group' content_ids: ['ID'], //array of one or more product ids in the page value: ['Price'], //OPTIONAL, but highly recommended currency: 'DKK' //REQUIRED if you a pass value }); </script> <noscript><img height="1" width="1" style="display:none" src="https://www.facebook.com/tr?id=1731795127080034&ev=PageView&noscript=1" /></noscript> {/literal} <!-- End Facebook Pixel Code --> Best regards Link to comment Share on other sites More sharing options...
vekia Posted July 6, 2016 Share Posted July 6, 2016 hello, id of what? price of what? the main question is where you want to put this code Link to comment Share on other sites More sharing options...
Niller Posted July 7, 2016 Author Share Posted July 7, 2016 Hey. ID and price of the product viewed. So i can use the pixel for dynamic retargeting ads, on visited products The code is in the header.tpl <head> tag. best regards Link to comment Share on other sites More sharing options...
vekia Posted July 10, 2016 Share Posted July 10, 2016 to display product price you can use code {$product->price} if you use only one currency, you dont have to replace it by variable Link to comment Share on other sites More sharing options...
Niller Posted July 19, 2016 Author Share Posted July 19, 2016 But how do i get the right product id in the pixel code? Link to comment Share on other sites More sharing options...
Niller Posted July 27, 2016 Author Share Posted July 27, 2016 any1 know the way or module to make facebook dynamic product ads work? best regards Link to comment Share on other sites More sharing options...
Niller Posted August 15, 2016 Author Share Posted August 15, 2016 bump Link to comment Share on other sites More sharing options...
vekia Posted August 23, 2016 Share Posted August 23, 2016 i wrote guide about fb conversion pixel - you can read here how to add it with html box pro module, it will replace dynamic variables like value of order or currency 1 Link to comment Share on other sites More sharing options...
perseo81 Posted July 27, 2017 Share Posted July 27, 2017 Hello Prestashoppers. I have this facebook pixel: How do i get the right ID and PRICE in the pixel, so i can make dynamic ads? <!-- Facebook Pixel Code --> {literal} <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', 'PIXELID'); fbq('track', "PageView"); fbq('track', 'ViewContent', { content_type: 'product', //either 'product' or 'product_group' content_ids: ['ID'], //array of one or more product ids in the page value: ['Price'], //OPTIONAL, but highly recommended currency: 'DKK' //REQUIRED if you a pass value }); </script> <noscript><img height="1" width="1" style="display:none" src="https://www.facebook.com/tr?id=1731795127080034&ev=PageView&noscript=1" /></noscript> {/literal} <!-- End Facebook Pixel Code --> Best regards Friend, how did you solve it? llevo dias intentandolo y no puedo 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