Title: Where is google analytics code in database ?
Last modified: January 31, 2018

---

# Where is google analytics code in database ?

 *  Resolved [claude17](https://wordpress.org/support/users/claude17/)
 * (@claude17)
 * [8 years, 4 months ago](https://wordpress.org/support/topic/where-is-google-analytics-code-in-database/)
 * Hi,
 * where does Google Analytics for WordPress by MonsterInsights write Google analytics
   code (UA-XXXXX) ?
    In WordPress database ? If yes, in which table please ? (I’d
   like to replace the code with a new code ans I have no access to WordPress dashboard.
   I can modify the database.)
 * Thanks a lot.

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

 *  Plugin Author [chriscct7](https://wordpress.org/support/users/chriscct7/)
 * (@chriscct7)
 * [8 years, 4 months ago](https://wordpress.org/support/topic/where-is-google-analytics-code-in-database/#post-9920685)
 * Hi there,
    If you used the auth method, it cannot be changed from the database,
   it would have to be done via the admin because changing the ua code also would
   require corresponding public and secret key changes which have to be issued during
   the Google oAuth flow and thus only in the admin can it be done.
 * If you used a filter or constant to set it, then you would need to adjust the
   corresponding code as it wouldn’t be stored in the database.
 * If you used the manual method, it would be in the monsterinsights_settings option
   in the world options table. Regular auth is in there or in dedicated keys depending
   on the version you have, but again you’d have to complete the auth flow again
   from the admin to make it work else all of the numbers will be off and the auth
   won’t work.
    -  This reply was modified 8 years, 4 months ago by [chriscct7](https://wordpress.org/support/users/chriscct7/).
 *  Plugin Author [chriscct7](https://wordpress.org/support/users/chriscct7/)
 * (@chriscct7)
 * [8 years, 4 months ago](https://wordpress.org/support/topic/where-is-google-analytics-code-in-database/#post-9920693)
 * It should also be noted if any sort of caching is enabled, database level changes
   won’t work for any method, you have to do it from the admin so the caches are
   cleared.
 * We heavily don’t recommend changing database values and in most cases it’s not
   going to work the way you are going to think it will.
 *  Thread Starter [claude17](https://wordpress.org/support/users/claude17/)
 * (@claude17)
 * [8 years, 4 months ago](https://wordpress.org/support/topic/where-is-google-analytics-code-in-database/#post-9922763)
 * Thanks a lot !

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

The topic ‘Where is google analytics code in database ?’ 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
 * 2 participants
 * Last reply from: [claude17](https://wordpress.org/support/users/claude17/)
 * Last activity: [8 years, 4 months ago](https://wordpress.org/support/topic/where-is-google-analytics-code-in-database/#post-9922763)
 * Status: resolved