Title: function __gaTrackerOptout() ?
Last modified: October 24, 2017

---

# function __gaTrackerOptout() ?

 *  Resolved [pako69](https://wordpress.org/support/users/pako69/)
 * (@pako69)
 * [8 years, 7 months ago](https://wordpress.org/support/topic/function-__gatrackeroptout/)
 * Hi
    I see in my source code some functions related to G.A.optout but how are 
   we supposed to use them? Thanks

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

 *  Plugin Author [chriscct7](https://wordpress.org/support/users/chriscct7/)
 * (@chriscct7)
 * [8 years, 7 months ago](https://wordpress.org/support/topic/function-__gatrackeroptout/#post-9614751)
 * Hi there,
    We have an example here: [https://github.com/awesomemotive/google-analytics-for-wordpress/issues/488#issuecomment-286031166](https://github.com/awesomemotive/google-analytics-for-wordpress/issues/488#issuecomment-286031166)
   and a full guide will be coming to our documentation later this year
 * -Chris
 *  Thread Starter [pako69](https://wordpress.org/support/users/pako69/)
 * (@pako69)
 * [8 years, 7 months ago](https://wordpress.org/support/topic/function-__gatrackeroptout/#post-9614853)
 * Hi thanks for the answer, but it seems that MonsterInsights is stil using Analytics.
   js? But what about the new gtag.js? :
 *     ```
       <!-- Global site tag (gtag.js) - Google Analytics -->
       <script async src="https://www.googletagmanager.com/gtag/js?id=UA-234217-21"></script>
       <script>
         window.dataLayer = window.dataLayer || [];
         function gtag(){dataLayer.push(arguments);}
         gtag('js', new Date());
   
         gtag('config', 'UA-XXXXXX-XX');
       </script>
       ```
   
 *  Plugin Author [chriscct7](https://wordpress.org/support/users/chriscct7/)
 * (@chriscct7)
 * [8 years, 7 months ago](https://wordpress.org/support/topic/function-__gatrackeroptout/#post-9617003)
 * Hi there,
    I’m not sure what you mean by “is still using analytics.js” but gtag.
   js and analytics.js are 2 different things. Gtag.js is not a replacement for 
   analytics.js (unlike for example how analytics.js was a replacement for ga.js).
   In fact, if you use Google Analytics inside of gtag.js, all it does is simply
   load analytics.js transform the events into that. Therefore, for the vast majority
   of our users, supporting gtag as opposed to analytics.js would not improve anything,
   it’d actually make things far worse. Consider that gtag.js’s file is unique to
   your server, so unlike analytics.js which is available on millions of websites
   and is cached on any standard web user’s browser, your gtag script wouldn’t be,
   so your users would now have to load a script unnecessarily (on top of the fact
   the entire gtag filesize, which is large compared to analytics.js would be essentially
   wasted). Bare in mind, gtag doesn’t even support all of analytics.js’s native
   features (like tasks or plugins) and doesn’t appear like they will any time soon(
   based on lack of autotrack support). Google even specifically recommends against
   using gtag.js unless you are using other Google services like Adwords (and since
   we only support GA, it doesn’t make sense to use gtag.js).
 * The point of gtag is to make certain Google tag options easier to use and more
   uniform (with more JSON syntax use), but it’s not a replacement to the native
   functions of those services, the same way that Measurement Protocol isn’t a replacement
   to analytics.js. They serve 2 very different purposes.
 * If, and when, Google Analytics releases a new tracking JS file, we’ll be the 
   first to support it (but bare in mind, even if Google introduced a new system,
   they keep supporting old ones, it’s not like they immediately break (Urchin.js,
   which was the precursor to ga.js (the precursor to analytics.js) from 10+ years
   ago is still being actively used on some sites)).
 * -Chris
 *  Thread Starter [pako69](https://wordpress.org/support/users/pako69/)
 * (@pako69)
 * [8 years, 7 months ago](https://wordpress.org/support/topic/function-__gatrackeroptout/#post-9618554)
 * Hi Chris and thanks for the great explanation 🙂
 * I was just asking you that because I read this below into my G.A. account:
 * _The Global Site Tag provides streamlined tagging across Google’s site measurement,
   conversion tracking, and remarketing products – giving you better control while
   making implementation easier. By using gtag.js, you will be able to benefit from
   the latest dynamic features and integrations as they become available.
    Global
   Site Tag (gtag.js) and Google Tag Manager are the recommended tracking methods
   for new implementations. Additional implementation options are also available
   including analytics.js and the Measurement Protocol.

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

The topic ‘function __gaTrackerOptout() ?’ 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/)

 * 4 replies
 * 2 participants
 * Last reply from: [pako69](https://wordpress.org/support/users/pako69/)
 * Last activity: [8 years, 7 months ago](https://wordpress.org/support/topic/function-__gatrackeroptout/#post-9618554)
 * Status: resolved