Title: Modify the GA tracking code
Last modified: August 21, 2016

---

# Modify the GA tracking code

 *  [stevewatson](https://wordpress.org/support/users/stevewatson/)
 * (@stevewatson)
 * [12 years, 6 months ago](https://wordpress.org/support/topic/modify-the-ga-tracking-code/)
 * I am trying to update the js tracking code to support Display Advertising which
   will track demographics. Apparently this only requires a single line of code:
 * ga.src = (‘https:’ == document.location.protocol ? ‘[https://ssl&#8217](https://ssl&#8217);:‘
   [http://www&#8217](http://www&#8217);) + ‘.google-analytics.com/ga.js’;
 * Change to:
 * ga.src = (‘https:’ == document.location.protocol ? ‘[https://&#8217](https://&#8217);:‘
   [http://&#8217](http://&#8217);) + ‘stats.g.doubleclick.net/dc.js’;
 * I have found where this code is written in the plugin and changed the code, but
   this isn’t being reflected on the website source code. It my method even possible?
   Have I done something wrong?
 * Kind regards.
 * [http://wordpress.org/plugins/blunt-ga/](http://wordpress.org/plugins/blunt-ga/)

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

 *  Plugin Author [John Huebner](https://wordpress.org/support/users/hube2/)
 * (@hube2)
 * [12 years, 6 months ago](https://wordpress.org/support/topic/modify-the-ga-tracking-code/#post-4334636)
 * There are 2 issues.
 * The first is where you’ve probably altered the code and the second has to due
   with validating the code after installation.
 * **Second issue first, verification with GA.**
 * We’ve actually been looking into using this modified version of the GA script.
   The problem that we run into is that GA wants to verify that you’ve made the 
   change. It does this by reading in the source of your home page and seeing if
   the correct code snippet is found. This is where the problem is because this 
   plugin does not actually include the code snippet in the source of your page.
   Instead the snippet they are looking for is in an external script that they cannot
   check.
 * Unfortunately I haven’t come up with a plan yet on how this can be corrected 
   and at this time I’m not even sure I can. In the end it will take a major overhaul
   of this plugin.
 * **First issue, where to edit the script.**
 * I’m going to assume that you edited the file **“blunt.ga.install.v3.js”** which
   is the uncompressed version of the script. This file isn’t actually used when
   running on a site. The version that is actually used id the compressed version**“
   blunt.ga.install.v3.min.js”**.
 * You have 2 choices:
    1. You can try to edit the compressed version
    2. You can alter the PHP Script to load the uncompresses version. This is actually
       easier. On line 14 of the file **“blunt.ga.class.php”** you will find this line:
       `
       private $minified = true;` change this value to false and the uncompressed JS
       file will be loaded.
 * Even if you make the modifications you will run into trouble with the second 
   issue.
 *  Thread Starter [stevewatson](https://wordpress.org/support/users/stevewatson/)
 * (@stevewatson)
 * [12 years, 6 months ago](https://wordpress.org/support/topic/modify-the-ga-tracking-code/#post-4334662)
 * I tried changing the minified value to false, but the source code still shows
   the ga.js code snippet. Not to worry, I can quite easily live without the demographics.
 * How are getting on with the items on your “to-do” list and the universal GA code
   snippet?
 * Thanks for responding and keep up the good work.
 *  Plugin Author [John Huebner](https://wordpress.org/support/users/hube2/)
 * (@hube2)
 * [12 years, 6 months ago](https://wordpress.org/support/topic/modify-the-ga-tracking-code/#post-4334684)
 * As far as the to-do list goes, I’ve been giving that a lot of thought lately.
   Please [read this post I put together about it](http://wordpress.org/support/topic/future-of-this-plugin-2?replies=1)
   last night.

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

The topic ‘Modify the GA tracking code’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/blunt-ga.svg)
 * [Blunt GA](https://wordpress.org/plugins/blunt-ga/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/blunt-ga/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/blunt-ga/)
 * [Active Topics](https://wordpress.org/support/plugin/blunt-ga/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/blunt-ga/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/blunt-ga/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [John Huebner](https://wordpress.org/support/users/hube2/)
 * Last activity: [12 years, 6 months ago](https://wordpress.org/support/topic/modify-the-ga-tracking-code/#post-4334684)
 * Status: not resolved