Page 3 of 5 FirstFirst 12345 LastLast
Results 21 to 30 of 47
  1. #21
    Join Date
    Mar 2004
    Posts
    201
    Plugin Contributions
    0

    Default Re: using facebook pixel to populate from my zencart to my fb business page.

    i am going to try to learn Javascript to see if I can get this to work.. i miss zencart..
    My Multi_Site Zen Carts
    http://herasonlinemarket.com

  2. #22
    Join Date
    Mar 2004
    Posts
    201
    Plugin Contributions
    0

    red flag Re: using facebook pixel to populate from my zencart to my fb business page.

    ok, I am missing zencart way more than i thought..
    and so many be putting out there were over a 200 hundred page views so maybe one of you can help.

    I found this from putting in Zencart and facebook pixel in the search engine
    I just don't understand what I am reading..
    <QUOTE.

    However, if you are running a marketing campaign where you are paying money to Facebook, you definitely want to be able to track the conversion rate of your ads.
    For this to happen you will need to make some changes to the Facebook code to work with Zencart.

    We need to add a tracking function to the pixel code which integrates with the Zen cart database variables. We have created this below for you to use within your facebook pixel code.

    if($_GET[‘main_page’] == ‘checkout_success’) {
    require_once(DIR_WS_CLASSES . ‘order.php’);
    $facebook_order = new order($zv_orders_id);
    //var_dump($facebook_order);
    ?>
    // Purchase
    // Track purchases or checkout flow completions (ex. landing on “Thank You” or confirmation page)
    fbq(‘track’, ‘Purchase’, {value: ‘‘, currency: ‘‘});
    </QUOTE>
    but i need the pixel to fire on view content
    and here is the code from facebook
    I got most of it to work
    <!-- trigger event-->
    <script>
    fbq('track', 'ViewContent', {
    value: 10.00,
    currency: 'USD',
    content_ids: 'products_id', --------------------.> this is not working correctly
    content_type: 'product',
    });
    </script>

    but I keep getting an error in my facebook catalog saying the content_id did not match the products_id.

    so I am thinking of all the people that have viewed this post someone should know how to make it work..
    thank you..
    My Multi_Site Zen Carts
    http://herasonlinemarket.com

  3. #23
    Join Date
    Mar 2004
    Posts
    201
    Plugin Contributions
    0

    Default Re: using facebook pixel to populate from my zencart to my fb business page.

    ok i am back to zencart, zencart rules...

    I followed these directions below I added a folder under my template folder called checkout_success, added the file tpl_footer.php
    and added the facebook pixel code to the bottom of that and it didn't show up on the chrome facebook pixel helper.
    and Extention on google chrome

    https://www.zen-cart.com/content.php...els-to-my-site.

    so I added it to the html_header.php and its fires. but the problem I have had this whole times is that the content_id that is supposed to pull the products_id need to be dynamic. (which I am understanding means not static number).. I have a few products and to put the individual products_id numbers in it it would have too many numbers.
    so just put in this code just for the content_id to match the products_id
    <?php echo $content_ids['products_id']; ?>

    i will tell tomorrow what facebook says about it
    Thank you for reading.. and have a great sleep.

    and even with this trouble i am having.. zencart rocks.
    My Multi_Site Zen Carts
    http://herasonlinemarket.com

  4. #24
    Join Date
    Jan 2007
    Posts
    1,484
    Plugin Contributions
    10

    Default Re: using facebook pixel to populate from my zencart to my fb business page.

    Do you have structured (they call it microdata on fb) installed on your site? You have to have that before it will pull data for a catalog. And you don't need the content_id. According to their docs: https://www.facebook.com/business/help/1044262445604547

    Zen Cart and it's community are the best!!

  5. #25
    Join Date
    Nov 2007
    Location
    Woodbine, Georgia, United States
    Posts
    4,018
    Plugin Contributions
    61

    Default Re: using facebook pixel to populate from my zencart to my fb business page.

    Okay so mine is working.

    1. You must have all of the required schema data in each product page (read the instructions)
    2. You will need to install the pixel in your common/html_header.php
    3. Then IF you are tracking conversions you will need to add the pixel in a new folder checkout_success/html_header.php and you will need to pull the query for the subtotal (minimum) to populate
    4. Then add some items to your catalog
    5. Bump up your sharing of the added and additional products, maybe even promote a few to get it to fires (weeks here)
    6. Keep checking your Facebook products screen in the add products button to see when the pixel has fired enough to be used for updates

    Here is an example from checkout_success/html_header.php

    Code:
    <!-- 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', 'XXXXXXXXXXXX');
      fbq('track', 'PageView');
      fbq('track', 'Purchase', {currency: "USD", value: <?php echo $order_summary['order_subtotal'];?>});
    </script>
    <noscript><img height="1" width="1" style="display:none"
      src="https://www.facebook.com/tr?id=XXXXXXXXXXXX&ev=PageView&noscript=1"
    /></noscript>
    <!-- End Facebook Pixel Code -->
    I am pulling the query with a helper file.... this part will be custom to your own setup with regard to schema etc and where or how it's pulled.

    ~Melanie
    PRO-Webs, Inc. :: Recent Zen Cart Projects :: Zen Cart SEO – 12 Steps to Success
    **I answer questions in the forum, private messages are NOT answered. You are welcome to contact us via our website for professional engagements.

  6. #26
    Join Date
    Jan 2007
    Posts
    1,484
    Plugin Contributions
    10

    Default Re: using facebook pixel to populate from my zencart to my fb business page.

    Also, read here for the required tags https://developers.facebook.com/docs...microdata-tags

    Zen Cart and it's community are the best!!

  7. #27
    Join Date
    Mar 2004
    Posts
    201
    Plugin Contributions
    0

    Default Re: using facebook pixel to populate from my zencart to my fb business page.

    yes, I do .. I have the plugin zen-cart_Structured-Data-master, and facebook open graph.
    My Multi_Site Zen Carts
    http://herasonlinemarket.com

  8. #28
    Join Date
    Mar 2004
    Posts
    201
    Plugin Contributions
    0

    Default Re: using facebook pixel to populate from my zencart to my fb business page.

    Quote Originally Posted by mprough View Post
    Okay so mine is working.

    1. You must have all of the required schema data in each product page (read the instructions) did this already
    2. You will need to install the pixel in your common/html_header.php did this
    3. Then IF you are tracking conversions you will need to add the pixel in a new folder ???????????????????????
    checkout_success/html_header.php and you will need to pull the query for the subtotal (minimum) to populate
    4. Then add some items to your catalog
    5. Bump up your sharing of the added and additional products, maybe even promote a few to get it to fires (weeks here)
    6. Keep checking your Facebook products screen in the add products button to see when the pixel has fired enough to be used for updates

    Here is an example from checkout_success/html_header.php

    Code:
    <!-- 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', 'XXXXXXXXXXXX');
      fbq('track', 'PageView');
      fbq('track', 'Purchase', {currency: "USD", value: <?php echo $order_summary['order_subtotal'];?>});
    </script>
    <noscript><img height="1" width="1" style="display:none"
      src="https://www.facebook.com/tr?id=XXXXXXXXXXXX&ev=PageView&noscript=1"
    /></noscript>
    <!-- End Facebook Pixel Code -->
    I am pulling the query with a helper file.... this part will be custom to your own setup with regard to schema etc and where or how it's pulled.

    ~Melanie

    so what I want is to have any time an item is viewed I want it to show up on my facebook page catalog, so I can sell on facebook also. And then be able to add a shopping button on Instagram.

    the pixel has worked for the most part. but I still get this error
    ------------------------------------------------------------------------------------------------------------------------
    1 Error
    These errors must be fixed.
    Events
    Missing content_ids or contents parameter from "ViewContent" in Naomi McClarrinon's business's Pixel
    Required parameter content_ids or contents is missing from more than 20% of ViewContent events in the last day
    URL
    -------------------------------------------------------------------------------------------------------------------------
    this is my facebook pixel right now.. and it is on the html_header.php

    <!-- 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', 'xxxxxxxxxxxxxxxxxxx2');
    fbq('track', 'PageView');
    </script>
    <noscript><img height="1" width="1" style="display:none"
    src="https://www.facebook.com/tr?id=xxxxxxxxxxxxxxx2&ev=PageView&noscript=1"
    /></noscript>
    <!-- End Facebook Pixel Code -->



    and the picture below shows that the products are pulling put the problem is the are showing OUT OF STOCK, and they are in stock.
    so i tried to make the folder checkout success and put in the tpl_footer.php and put this code

    <script>
    fbq('track', 'ViewContent', {
    value: 10.00,
    currency: 'USD',
    content_type: 'product',
    <?php echo $content_ids['products_id']; ?>
    });
    </script>
    and this on the bottom of that page.
    but it doesn't fire.
    so I am so confused and what I am supposed to put in the checkout success folder... I want view content, not what is bought yet.

    thank you
    Noppie
    My Multi_Site Zen Carts
    http://herasonlinemarket.com

  9. #29
    Join Date
    Jan 2007
    Posts
    1,484
    Plugin Contributions
    10

    Default Re: using facebook pixel to populate from my zencart to my fb business page.

    I have
    PHP Code:
    <script>
      
    fbq('track''ViewContent');
    </script> 
    in tpl_products_info_display and it works. You could have this in the footer and it should work, too. The info is passed from the metatags, you have to have the required metatags from the page I linked. Probably the easiest way is to use the structured data module https://github.com/torvista/zen-cart_Structured-Data is what I use. It has everything needed. You can test it here: https://search.google.com/structured-data/testing-tool
    Last edited by lankeeyankee; 2 Aug 2019 at 05:20 AM.

    Zen Cart and it's community are the best!!

  10. #30
    Join Date
    Mar 2004
    Posts
    201
    Plugin Contributions
    0

    Default Re: using facebook pixel to populate from my zencart to my fb business page.

    Quote Originally Posted by lankeeyankee View Post
    I have
    PHP Code:
    <script>
      
    fbq('track''ViewContent');
    </script> 
    in tpl_products_info_display and it works. You could have this in the footer and it should work, too. The info is passed from the metatags, you have to have the required metatags from the page I linked. Probably the easiest way is to use the structured data module https://github.com/torvista/zen-cart_Structured-Data is what I use. It has everything needed. You can test it here: https://search.google.com/structured-data/testing-tool
    that didn't work see pictures.

    they are showing up on facebook but showing out of stock when they are in stock..

    so its the same problem I have had over and over again.. content_id not pulling information from products_id


    now what?
    My Multi_Site Zen Carts
    http://herasonlinemarket.com

 

 
Page 3 of 5 FirstFirst 12345 LastLast

Similar Threads

  1. Facebook Advertising Pixel tracking code.
    By MikeyG in forum General Questions
    Replies: 4
    Last Post: 16 Sep 2017, 09:07 AM
  2. v139h i wanna install facebook pixel into my website
    By juneloweelyn in forum Basic Configuration
    Replies: 4
    Last Post: 10 Apr 2016, 11:21 AM
  3. facebook javascript for remarketing pixel
    By juneloweelyn in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 24 Mar 2014, 02:27 AM
  4. Is there a Facebook Add On for Fan Page Store tab?
    By kevinmc3 in forum All Other Contributions/Addons
    Replies: 5
    Last Post: 30 May 2010, 11:51 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR