Jump to content

FB pixel for dynamic product ads


Recommended Posts

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,
 
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"
/></noscript>
{/literal}
<!-- End Facebook Pixel Code -->
 
Best regards
Link to comment
Share on other sites

  • 2 weeks later...
  • 2 weeks later...
  • 3 weeks later...
  • 11 months later...

 

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,
 
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"
/></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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...