Title: Where can I find Google Analytics code?
Last modified: June 11, 2017

---

# Where can I find Google Analytics code?

 *  Resolved [kevindp](https://wordpress.org/support/users/kevindp/)
 * (@kevindp)
 * [9 years, 2 months ago](https://wordpress.org/support/topic/where-can-i-find-google-analytics-code/)
 * We’re using Autoptimize on our website. Our Google Analytics account is tracking
   this website and appears to be working properly. However, I’d like to see the
   actual Google Analytics website tracking code that is on the site. Where / how
   can I find this? All that I see in the code is:
 * jQuery(document).ready(function () {
    jQuery.post(‘[http://SITEURL.com?ga_action=googleanalytics_get_script&#8217](http://SITEURL.com?ga_action=googleanalytics_get_script&#8217);,{
   action: ‘googleanalytics_get_script’}, function(response) { var F = new Function(
   response ); return( F() ); }); });</script>
 * I’d like to be able to see the code itself, which should read:
 * <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&#8217](https://www.google-analytics.com/analytics.js&#8217);,’
   ga’);
 *  ga(‘create’, ‘UACODEGOESHERE’, ‘auto’);
    ga(‘send’, ‘pageview’);
 * </script>
 * Thank you in advance for your help!

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

 *  Plugin Author [Optimizing Matters](https://wordpress.org/support/users/optimizingmatters/)
 * (@optimizingmatters)
 * [9 years, 2 months ago](https://wordpress.org/support/topic/where-can-i-find-google-analytics-code/#post-9217964)
 * the “normal” GA code you mention, is never touched by AO actually, so it seems(
   as confirmed by the `googleanalytics_get_script` code), that you’re using a plugin
   which does things … differently. this will very likely also be the case when 
   you test your site without AO by adding `?ao_noptimize=1` to the URL.
 * frank
 *  Thread Starter [kevindp](https://wordpress.org/support/users/kevindp/)
 * (@kevindp)
 * [9 years, 2 months ago](https://wordpress.org/support/topic/where-can-i-find-google-analytics-code/#post-9221644)
 * Makes sense. Given that’s the case, I think the culprit is actually the ShareThis
   Google Analytics plugin. Thanks!

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

The topic ‘Where can I find Google Analytics code?’ is closed to new replies.

 * ![](https://ps.w.org/autoptimize/assets/icon-256X256.png?rev=2211608)
 * [Autoptimize](https://wordpress.org/plugins/autoptimize/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/autoptimize/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/autoptimize/)
 * [Active Topics](https://wordpress.org/support/plugin/autoptimize/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/autoptimize/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/autoptimize/reviews/)

## Tags

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

 * 2 replies
 * 2 participants
 * Last reply from: [kevindp](https://wordpress.org/support/users/kevindp/)
 * Last activity: [9 years, 2 months ago](https://wordpress.org/support/topic/where-can-i-find-google-analytics-code/#post-9221644)
 * Status: resolved