Title: Disabling Analytics code on subdomain
Last modified: August 21, 2016

---

# Disabling Analytics code on subdomain

 *  [videosurfer](https://wordpress.org/support/users/videosurfer/)
 * (@videosurfer)
 * [12 years, 2 months ago](https://wordpress.org/support/topic/disabling-analytics-code-on-subdomain/)
 * Is there a way to disable the Analytics code from showing when a subdomain is
   active? For example I would like the code to display for [http://www.example.com](http://www.example.com),
   but not for [http://m.example.com](http://m.example.com) . I am using WordPress
   Mobile Pack, with a subdomain for a mobile theme to display, and I need to add
   custom mobile Analytics code instead of Google’s JS code, and thus need it to
   be disabled.
 * [https://wordpress.org/plugins/google-analytics-for-wordpress/](https://wordpress.org/plugins/google-analytics-for-wordpress/)

Viewing 1 replies (of 1 total)

 *  Thread Starter [videosurfer](https://wordpress.org/support/users/videosurfer/)
 * (@videosurfer)
 * [12 years, 2 months ago](https://wordpress.org/support/topic/disabling-analytics-code-on-subdomain/#post-4658800)
 * Ok so the simplest solution is to set GA for WP to allow you to insert the tracking
   code manually ([http://yoast.com/wordpress/google-analytics/manual-placement/](http://yoast.com/wordpress/google-analytics/manual-placement/)),
   and not include the function in the mobile theme.

Viewing 1 replies (of 1 total)

The topic ‘Disabling Analytics code on subdomain’ 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/)

## Tags

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

 * 1 reply
 * 1 participant
 * Last reply from: [videosurfer](https://wordpress.org/support/users/videosurfer/)
 * Last activity: [12 years, 2 months ago](https://wordpress.org/support/topic/disabling-analytics-code-on-subdomain/#post-4658800)
 * Status: not resolved