Title: Enable Google optimize
Last modified: February 22, 2017

---

# Enable Google optimize

 *  Resolved [Fran Sanchez](https://wordpress.org/support/users/fransanchezoria/)
 * (@fransanchezoria)
 * [9 years, 3 months ago](https://wordpress.org/support/topic/enable-google-optimize/)
 * Hi,
 * I am trying to enable the new Google optimize ([https://optimize.google.com/optimize/home/](https://optimize.google.com/optimize/home/))
   and I am not able to. As per Google instructions I should insert:
 * `ga('require', 'GTM-XXXXXXX');`
 * right before:
 * `ga('send', 'pageview');`
 * I tried adding custom code in settings but it doesnt work. I also tried these
   variations:
 *     ```
       __gaTracker('require', 'GTM-XXXXXXX');
       ```
   
 * and
 *     ```
       __gaTracker( function() {
         window.ga = __gaTracker;
       } );
       ga('require', 'GTM-XXXXXXX');
       ```
   
 * None of these work. Can you please help
    -  This topic was modified 9 years, 3 months ago by [Fran Sanchez](https://wordpress.org/support/users/fransanchezoria/).

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

 *  Thread Starter [Fran Sanchez](https://wordpress.org/support/users/fransanchezoria/)
 * (@fransanchezoria)
 * [9 years, 3 months ago](https://wordpress.org/support/topic/enable-google-optimize/#post-8842511)
 * Anyone?
 *  [Joao Almeida](https://wordpress.org/support/users/t3mujin/)
 * (@t3mujin)
 * [9 years, 2 months ago](https://wordpress.org/support/topic/enable-google-optimize/#post-8955660)
 * Any feedback on this?
 *  Plugin Author [chriscct7](https://wordpress.org/support/users/chriscct7/)
 * (@chriscct7)
 * [9 years, 2 months ago](https://wordpress.org/support/topic/enable-google-optimize/#post-8958081)
 * Putting the `__gaTracker('require', 'GTM-XXXXX');` in the custom code section
   will work.
 * We’ll also be offering a complete integration with the Optimize page-hiding feature
   in an upcoming update of the Performance addon
 * -Chris

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

The topic ‘Enable Google optimize’ is closed to new replies.

 * ![](https://ps.w.org/google-analytics-for-wordpress/assets/icon.svg?rev=2976619)
 * [MonsterInsights - Google Analytics Dashboard for WordPress (Website Stats Made Easy)](https://wordpress.org/plugins/google-analytics-for-wordpress/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/google-analytics-for-wordpress/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/google-analytics-for-wordpress/)
 * [Active Topics](https://wordpress.org/support/plugin/google-analytics-for-wordpress/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/google-analytics-for-wordpress/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/google-analytics-for-wordpress/reviews/)

 * 3 replies
 * 3 participants
 * Last reply from: [chriscct7](https://wordpress.org/support/users/chriscct7/)
 * Last activity: [9 years, 2 months ago](https://wordpress.org/support/topic/enable-google-optimize/#post-8958081)
 * Status: resolved