• DataLife

    (@antibalashifi)


    Hi ????

    Your plugin works great so far, thank you. However it broke my Google Analytics, so Purchases are no longer being tracked as conversions.

    I’m using the official plugins for setting up analytics, so this plugin would need the follow the standardized WooCommerce framework:

    • Google Analytics for WooCommerce (by WooCommerce)
    • Google for WooCommerce (by WooCommerce)
    • Site Kit (by Google)

    I asked WooCommerce support how to fix this:

    Can I just change the “Order received” endpoint in WooCommerce > Settings > Advanced? Is that how the Woo plugins know where to put the tracking code? Will I have to redo the analytics setup afterwards?

    They replied:

    This would depend on the plugin you are using to generate the new thank you page. I would follow the instructions provided by the developers of the plugin. A custom thank you page needs to take into account a number of factors, as the regular order-received endpoint is not a page, but a separate part of the checkout – you will see that it actually appears as checkout/order-received
     
    The code is injected into the thank you page by the woocommerce_thankyou action. This action is used by many plugins, and your custom thank you page plugin should execute the code correctly, or the custom page may break more than just the analytics.

    WooCommerce Support

    Please let me know what you think of this, I am in a bit of a rush because my Ads and Analytics are now broken — thank you!

Viewing 1 replies (of 1 total)
  • Thread Starter DataLife

    (@antibalashifi)

    Hi, just following up.

    If you support for the woocommerce_thankyou action hook, and you don’t know why it broke, even that is useful information.

    Can I add this code to the custom thank you page template?

    <?php 
    // Make sure to get the order ID
    $order_id = get_query_var('order-received');
    // Execute the woocommerce_thankyou action with the order ID
    do_action('woocommerce_thankyou', $order_id);
    ?>

    • This reply was modified 3 weeks, 3 days ago by DataLife.
    • This reply was modified 3 weeks, 3 days ago by DataLife.
Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.