Help Desk

Events and Facebook pixel

  • Posts: 9 Topics: 2
    | Permalink

    Hi,
    All products made in Woocommerce work fine on my Facebook page using a Facebook pixel. I can sell them directly from Facebook.
    But all the events made in Event Tickets Plus which are also automatically created as a product in Woocommerce, they won’t work on my Facebook page. And it’s only events/products generated from Event Tickets Plus that I’m not able to sell from Facebook.

    Facebook shows the products but they are all “in review” or “not published”. I have testet that the events have text, picture and a SKU id and the Facebook ID and are visible.
    The plugin for Woocommerce and Facebook pixel works fine.

    So why won’t it work with Event Tickets?

    Kind regards,

    Posts: 17532 Topics: 14 Answers: 973
    | Permalink

    Hi Ole,

    I suspect the problem is that we automatically redirect requests to see ticket products to the matching single event page. You can undo this behavior however with a small snippet like this one:

    add_action( 'plugins_loaded', function() {
        $wc_tickets = Tribe__Tickets_Plus__Commerce__WooCommerce__Main::get_instance();
        remove_filter( 'post_type_link', [ $wc_tickets, 'hijack_ticket_link' ] );
    }, 20 );

    This could be added either to a custom plugin (preferred) or else to your theme’s functions.php file.

    Does that help?

    Posts: 9 Topics: 2
    | Permalink

    Thank you, but no it doesn’t work.

    I have tried the child theme and the main theme functions.php and also inside the event ticket plus plugin.
    Which plugin should the code be added to instead…?

    regards,

    Posts: 17532 Topics: 14 Answers: 973
    | Permalink

    The above code should – ideally – be added to a custom plugin rather than an existing plugin.

    The easiest way to do this is to create a new file within your mu-plugins directory, something like:

    wp-content/mu-plugins/ticket-customizations.php

    Remember to add an opening <?php tag!

    Posts: 9 Topics: 2
    | Permalink
    Correct Answer

    Hm… I don’t understand? I don’t have any mu-plugins directory. And why all this coding? Why can’t you just make the plugin work with Facebook pixels? All products made directly in Woocommerce works fine.

    • Gert
    Posts: 9 Topics: 2
    | Permalink
    This reply has been marked as private.
    Posts: 17532 Topics: 14 Answers: 973
    | Permalink

    Hi Gert,

    I don’t have any mu-plugins directory. And why all this coding?

    OK – you may need to create it in that case.

    Why can’t you just make the plugin work with Facebook pixels? All products made directly in Woocommerce works fine.

    Can you confirm which plugin or tool you are using to add these pixels? If it is not a free plugin that we can download ourselves, can you share it via a private reply?

    Posts: 9 Topics: 2
    | Permalink

    Okay, thanks.

    It’s the free plugin – Facebook for Woocommerce.

    Posts: 17532 Topics: 14 Answers: 973
    | Permalink

    Thanks!

    You could try installing and activating this helper plugin — it should make it so that when new tickets are saved, they are immediately published to your Facebook store. Note that this requires you are at least running PHP 5.3.

    It’s also worth highlighting that this does not directly do anything with the “Facebook pixel”, it simply tells Facebook for WooCommerce to publish the ticket product to whichever Facebook account is connected.

    Hopefully that helps 🙂

    Posts: 9 Topics: 2
    | Permalink

    No, this is not a solution. The whole point is that it should run via Facebook pixel to get analyzing results about customer target group.

    I still don’t understand why it does not work when the events from Event ticket plus are also created in Woocommerce with text, category, image and price, just like all the other products created directly in Woocommerce?

    Posts: 17532 Topics: 14 Answers: 973
    | Permalink

    It definitely may not be the complete solution you are seeking, but I’d suggest it’s a decent start. At the beginning of this exchange you had noted:

    And it’s only events/products generated from Event Tickets Plus that I’m not able to sell from Facebook.

    For any new tickets you create, this makes it so they are registered with your Facebook page and will show up in your Facebook shop so you can sell them from there (it doesn’t deal with existing tickets that were already created at present, however).

    The whole point is that it should run via Facebook pixel to get analyzing results about customer target group.

    I still don’t understand why it does not work when the events from Event ticket plus are also created in Woocommerce with text, category, image and price, just like all the other products created directly in Woocommerce?

    This is a different part of the larger problem.

    My assumption is that Facebook for WooCommerce adds the tracking pixel to product pages but, reasonably enough, does not do so for event pages that contain tickets (because it doesn’t “know” about them).

    That to say, there’s no bug here that I see – simply a need for some further integration work to be done if you want all 3 plugins (Event Tickets Plus, WooCommerce and Facebook for WooCommerce) to work together cohesively. I’ve shared a partial solution above and hopefully we’ll be able to develop that further over time, but I cannot commit to doing so in the short term.

    Remember that you can also reach out to the developers of your other plugins and indeed if you need more help than any of us can provide in the sort of timescales you expect, you can reach out to suitable designer/developers for further assistance:

    theeventscalendar.com/find-a-customizer

    Thanks!

    Posts: 9 Topics: 2
    | Permalink

    Hi Barry,

    Thanks for this fine explanation. I will look into it myself following your advice.

    Best regards,

    Posts: 17532 Topics: 14 Answers: 973
    | Permalink

    You got it 🙂

You must be logged in and hold an active support license to create new topics in the help desk. Please visit our products store to purchase a license.

Subscribe to Updates