Support » Plugin: Blunt GA » 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’ : ‘http://www’) + ‘’;

    Change to:

    ga.src = (‘https:’ == document.location.protocol ? ‘https://’ : ‘http://’) + ‘’;

    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.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author John Huebner


    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 “” 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 “”.

    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 “” 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.

    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


    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 last night.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Modify the GA tracking code’ is closed to new replies.