Title: Add Optimize code to analytics snippet
Last modified: May 31, 2017

---

# Add Optimize code to analytics snippet

 *  Resolved [Henk Verlinde](https://wordpress.org/support/users/ve6304/)
 * (@ve6304)
 * [9 years ago](https://wordpress.org/support/topic/add-optimize-code-to-analytics-snippet/)
 * Hello Daan,
 * Thanks for your great plugin. Nice work!
 * I would like to opt for an option to add the Google Optimize code `ga('require','
   GTM-XXXXXX');` to the analytics code snippet, like so:
 *     ```
       <script>
         (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
         (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
         m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
         })(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
   
         ga('create', 'UA-XXXXXXX-X', 'auto');
         ga('require', 'GTM-XXXXXX');
         ga('send', 'pageview');
   
       </script>
       ```
   
 * Read more on how to deploy Optimize on [this Optimize Help page](https://support.google.com/360suite/optimize/answer/6262084?hl=en).
 * With the recently released free version of Google Optimize, I think you have 
   a substantial user base that would like to have this option.
 * Regards, Henk

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

 *  Plugin Author [Daan van den Bergh](https://wordpress.org/support/users/daanvandenbergh/)
 * (@daanvandenbergh)
 * [9 years ago](https://wordpress.org/support/topic/add-optimize-code-to-analytics-snippet/#post-9183440)
 * I know, Henk! I reaeally should get around to doing this. People have been requesting
   it for a few months now, and although I feel really guilty about releasing so
   few updates, it’s simply a too busy time for me!
 * I promise, the next release will have Google Optimize integration.
 *  Thread Starter [Henk Verlinde](https://wordpress.org/support/users/ve6304/)
 * (@ve6304)
 * [9 years ago](https://wordpress.org/support/topic/add-optimize-code-to-analytics-snippet/#post-9184828)
 * OK, thanks. Looking forward to it then -;)

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

The topic ‘Add Optimize code to analytics snippet’ is closed to new replies.

 * ![](https://ps.w.org/host-analyticsjs-local/assets/icon-256x256.png?rev=3307068)
 * [CAOS | Host Google Analytics Locally](https://wordpress.org/plugins/host-analyticsjs-local/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/host-analyticsjs-local/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/host-analyticsjs-local/)
 * [Active Topics](https://wordpress.org/support/plugin/host-analyticsjs-local/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/host-analyticsjs-local/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/host-analyticsjs-local/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [Henk Verlinde](https://wordpress.org/support/users/ve6304/)
 * Last activity: [9 years ago](https://wordpress.org/support/topic/add-optimize-code-to-analytics-snippet/#post-9184828)
 * Status: resolved