Title: Missing google analytics hook
Last modified: June 3, 2020

---

# Missing google analytics hook

 *  Resolved [julian1983](https://wordpress.org/support/users/julian1983/)
 * (@julian1983)
 * [6 years ago](https://wordpress.org/support/topic/missing-google-analytics-hook/)
 * Hello,
 * i do have a problem with your plugin (which is awesome), the custom thank you
   page can’t be tracked by google analytics. This is what the tag manager says:
 * A WooCommerce extension alters your default order received page
    WooCommerce 
   by default does not include any Google Analytics tracking. You need to use a 
   plugin to achieve this. Most plugins rely on some hooks and functions on the 
   order received page that WooCommerce executes by default. There are some WooCommerce
   plugins however that alter this order received page allowing you to select a 
   custom-made page instead of the default page. This is shiny and useful in most
   cases but some plugins doÂ not execute the same hooks and codes on those custom
   order received pages, preventing other plugins to see that the user just placed
   an order. Obviously, you should either avoid using such plugins or contact the
   plugin author to update the plugin so that it mimics all elements and behavior
   of the default order received page.
 * If you are using a custom thankyou page, you will need to ensure that some background
   code tells my plugin and other plugins that this is your order received page.
   You can do this my hooking into the woocommerce_is_order_received_page filter
   and return true on your custom page:
    [https://docs.woocommerce.co&#8230](https://docs.woocommerce.co&#8230);
 * you should create a new function in your PHP files and use the add_filter() WordPress
   function to hook into the woocommerce_is_order_received_page filter. You need
   to check whether the user is on your own thankyou page. This could be done using
   the is_page() WordPress function using the post ID of your thankyou page.
 * You will also need to ensure that the order key is present in the URL of the 
   custom thankyou page like on the default page.
 * Rules of thumb: you need to exactly mimic the background behavior of the default
   order received page.
 * The hook woocommerce_is_order_received_page should be true. The thank you page
   should have the same php structure as the original thank you page.
 * Any help is really appreciated. Kind regards Julian
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fmissing-google-analytics-hook%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 4 replies - 1 through 4 (of 4 total)

 *  Plugin Author [artiosmedia](https://wordpress.org/support/users/artiosmedia/)
 * (@artiosmedia)
 * [6 years ago](https://wordpress.org/support/topic/missing-google-analytics-hook/#post-12936860)
 * Thanks [@julian1983](https://wordpress.org/support/users/julian1983/), for your
   extensive information on this issue. We will look into it as soon as possible!
 *  [nina](https://wordpress.org/support/users/ninanevski/)
 * (@ninanevski)
 * [5 years, 12 months ago](https://wordpress.org/support/topic/missing-google-analytics-hook/#post-12996155)
 * I’m having this issue and honestly SO ANNOYED. I bought the official woocommerce
   custom thank you page plugin instead of the free ones and this is what I get?
   How did you not think of this for your existing users?? Doesnt fit in my mind.
   Please fix this!!
 *  Plugin Author [artiosmedia](https://wordpress.org/support/users/artiosmedia/)
 * (@artiosmedia)
 * [5 years, 12 months ago](https://wordpress.org/support/topic/missing-google-analytics-hook/#post-12996273)
 * [@ninanevski](https://wordpress.org/support/users/ninanevski/) You are commenting
   and seeking support on the wrong plugin, where there are several thank you plugins.
   This plugin is not a paid version, it is a free version. There is no PAID version.
   We are working on the google analytics problem [@julian1983](https://wordpress.org/support/users/julian1983/)
   mentioned, but the developer is not very responsive. Sorry for your complications
   with a different Thank You plugin.
 *  Plugin Author [artiosmedia](https://wordpress.org/support/users/artiosmedia/)
 * (@artiosmedia)
 * [5 years, 11 months ago](https://wordpress.org/support/topic/missing-google-analytics-hook/#post-13052312)
 * Greetings [@julian1983](https://wordpress.org/support/users/julian1983/),
 * I apologize for the delay, where I passed this query by two developers to assure
   the Google Analytics hook was working. The hook “woocommerce_is_order_received_page”
   is already added to line 33 and returning true, no update required.
 * Additionally, a test proves that Google Analytics can track the dynamic page 
   and record it both historically and in real-time: [https://1drv.ms/u/s!Ao5j0UBIYug4vSHWoHWDtryFn8Kw?e=9aQiaM](https://1drv.ms/u/s!Ao5j0UBIYug4vSHWoHWDtryFn8Kw?e=9aQiaM)
 * Therefore we can conclude the plugin is performing correctly as released and 
   thus whatever problems you may be having with Google Analytics is unrelated to
   the plugin itself.
 * Thanks!

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Missing google analytics hook’ is closed to new replies.

 * ![](https://ps.w.org/custom-thank-you-for-woocommerce/assets/icon-256x256.jpg?
   rev=2250331)
 * [Custom Thank You for WooCommerce](https://wordpress.org/plugins/custom-thank-you-for-woocommerce/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/custom-thank-you-for-woocommerce/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/custom-thank-you-for-woocommerce/)
 * [Active Topics](https://wordpress.org/support/plugin/custom-thank-you-for-woocommerce/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/custom-thank-you-for-woocommerce/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/custom-thank-you-for-woocommerce/reviews/)

## Tags

 * [hook](https://wordpress.org/support/topic-tag/hook/)

 * 4 replies
 * 3 participants
 * Last reply from: [artiosmedia](https://wordpress.org/support/users/artiosmedia/)
 * Last activity: [5 years, 11 months ago](https://wordpress.org/support/topic/missing-google-analytics-hook/#post-13052312)
 * Status: resolved