Title: Changing analytics script
Last modified: August 22, 2016

---

# Changing analytics script

 *  [mlhwebsites](https://wordpress.org/support/users/mlhwebsites/)
 * (@mlhwebsites)
 * [11 years, 6 months ago](https://wordpress.org/support/topic/changing-analytics-script/)
 * I have been trying for a couple of days to modify the Google Analytics script
   to take advantage of new tracking capability. Although the values in “Additional
   Page Headers” in general settings show the modified script, the change is not
   there when you “view source” on the actual site. I have deactivated the plugin,
   cleared cache, cookies, history, re-booted, and every other thing I can think
   of including deleting the script in the settings and deactivating the plugin.
   Even with no value in settings the original value is still on the site.
 * It acts like a cache issue but I don’t have any cache or similar plugins. Any
   suggestions? Do I need to delete any temp files stored with the plugin?
 * Thanks much for any ideas! Site:: [http://www.adalawsuitdefenselawyer.com](http://www.adalawsuitdefenselawyer.com)
 * Mike Hodges
 * [https://wordpress.org/plugins/all-in-one-seo-pack/](https://wordpress.org/plugins/all-in-one-seo-pack/)

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

 *  Plugin Support [Steve M](https://wordpress.org/support/users/wpsmort/)
 * (@wpsmort)
 * [11 years, 6 months ago](https://wordpress.org/support/topic/changing-analytics-script/#post-5500470)
 * Hi Mike,
 * The first thing you need to do is remove your Google Analytics UA- number from
   All in One SEO, General Settings, Google Settings, Google Analytics ID. This 
   will remove the standard tracking code that All in One SEO Pack outputs. One 
   you’ve done that you can add your custom code to the Additional Post Headers,
   Additional Page Headers and Additional Front Page Headers fields. A better option
   though would be to add the tracking code to the header.php file in your theme.
 * You didn’t say what you were trying to customize in your tracking code. Perhaps
   we have a setting for what you’re trying to do.
 *  Thread Starter [mlhwebsites](https://wordpress.org/support/users/mlhwebsites/)
 * (@mlhwebsites)
 * [11 years, 6 months ago](https://wordpress.org/support/topic/changing-analytics-script/#post-5500485)
 * I thought about changing the header but was concerned this would be wiped out
   every time theme was updated.
 * What I’m trying to change part of the analytics script suggested by analytics
   to take advantage of new demographics reporting. The change is shown below:
 * Original Script:
 * ga.src = (‘https:’ == document.location.protocol ? ‘[https://ssl&#8217](https://ssl&#8217);:‘
   [http://www&#8217](http://www&#8217);) + ‘.google-analytics.com/ga.js’;
 * Modified:
 *  ga.src = (‘https:’ == document.location.protocol ? ‘[https://&#8217](https://&#8217);:‘
   [http://&#8217](http://&#8217);) + ‘stats.g.doubleclick.net/dc.js’;
 *  Plugin Support [Steve M](https://wordpress.org/support/users/wpsmort/)
 * (@wpsmort)
 * [11 years, 6 months ago](https://wordpress.org/support/topic/changing-analytics-script/#post-5500486)
 * We have an option for demographics, it’s under All in One SEO, General Settings,
   Google Settings, Display Advertising Tracking – [http://semperplugins.com/documentation/advanced-google-analytics-settings/#displayadvertisingtracking](http://semperplugins.com/documentation/advanced-google-analytics-settings/#displayadvertisingtracking)
 *  Thread Starter [mlhwebsites](https://wordpress.org/support/users/mlhwebsites/)
 * (@mlhwebsites)
 * [11 years, 6 months ago](https://wordpress.org/support/topic/changing-analytics-script/#post-5500496)
 * Great – I’ve turned that on – Should I keep the tracking code in place – looks
   fine now? I Put it in all 3 header sections as you recommended.
 * The analytics steps are:
 * 1. Add tracking code
    2. Under property settings (Admin section) set Enable Display
   Features to ON.
 * I just checked my other sites and they are not showing data after 24 hours so
   there my be a problem with their instructions. I completed 2 also. Sometimes 
   their instructions are a little ambiguous so I could have missed something.
 * Thanks again for your supper support!
 *  Plugin Support [Steve M](https://wordpress.org/support/users/wpsmort/)
 * (@wpsmort)
 * [11 years, 6 months ago](https://wordpress.org/support/topic/changing-analytics-script/#post-5500501)
 * You just need to enter your UA number in All in One SEO, General Settings, Google
   Settings, Google Analytics ID and enable Display Advertising Tracking. The plugin
   will do the rest for you. You don’t need to manually add any code anywhere else.
 *  Thread Starter [mlhwebsites](https://wordpress.org/support/users/mlhwebsites/)
 * (@mlhwebsites)
 * [11 years, 6 months ago](https://wordpress.org/support/topic/changing-analytics-script/#post-5500504)
 * Ok great – I’ll delete code, remove the ua number – just like your earlier steps
   to actually remove my code.
 * Thanks very much – I really appreciate your help. I’ll let you know if I get 
   the data then.

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

The topic ‘Changing analytics script’ is closed to new replies.

 * ![](https://ps.w.org/all-in-one-seo-pack/assets/icon.svg?rev=2443290)
 * [All in One SEO – Powerful SEO Plugin to Boost SEO Rankings & Increase Traffic](https://wordpress.org/plugins/all-in-one-seo-pack/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/all-in-one-seo-pack/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/all-in-one-seo-pack/)
 * [Active Topics](https://wordpress.org/support/plugin/all-in-one-seo-pack/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/all-in-one-seo-pack/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/all-in-one-seo-pack/reviews/)

 * 6 replies
 * 2 participants
 * Last reply from: [mlhwebsites](https://wordpress.org/support/users/mlhwebsites/)
 * Last activity: [11 years, 6 months ago](https://wordpress.org/support/topic/changing-analytics-script/#post-5500504)
 * Status: not resolved