For quite a few years the University library where I work has used Google Analytics to track usage of our web pages. Recently I noticed it wasn't working. The code had some how disappeared from the page - possibly in a WordPress upgrade. It is working now.

Here is the oddity. Google Analytics never stopped reporting usage statistics. The University has its own tracking code so my assumption is they came from there. Is Google's system clever enough to know how to associate numbers for our account with the University one? Can the numbers I have be trusted?

After doing some further investigation, I can confirm our tracking code has not been properly implemented since October 2013. It was then when the University switched over WordPress which seems to have treated the code as Character Data. Then in mid-August 2015 the code vanished entirely. I now have it in an external file which seems to work fine. However while there has been a noticeable drop in web traffic from July 1, 2013 to the present, it does not entirely coincide with either the WordPress migration or the GA code's disappearance last summer.

I'm not entirely sure this answers the question, however. Google Analytics was giving a "tracking code mismatch" error until I re-inserted the code. However it still reported results. Exactly how accurate they were remains to be seen.

  • With Recently I noticed it wasn't working. you mean that code had some how disappeared? If you check network traffic and filter for collect are there any calls? If yes - then there is still GA code. If no, than the statistics are not send by your browser - maybe they use a server-side library.
    – Jurik
    Jun 23, 2016 at 12:59
  • By "not working" I mean GA was not reporting active users on the site. I sent test traffic and opened up several browser windows, but the number of active users remained zero. I eventually found out the code had indeed disappeared. According to the Wayback Machine it was there until late August 2015 (albeit with the CDATA wrapper around it) and then just disappeared. I did not touch it. Either it vanished in a WordPress upgrade or the University webmaster removed it. I don't have any access to the network or the webserver unfortunately.
    – Mike P
    Jun 23, 2016 at 16:29

1 Answer 1


To answer the first part of your question, no Google Analytics does not add additional tracking codes to your site if it has a parent tracking code. EG: If you have a university wide tracking code as well as your own tracking code and then your tracking code is removed and the university code stays it will report only on the university tracking code and not your removed one. The only reason why I can think that you would still see traffic from it with the tracking code removed is if there where users who where accessing a cached version of your site on a business network or through an ISP who cached the website as the cached copy would still have your own tracking code within the HTML. If this occurred you would see less traffic that what actually hit your site due to the fact that not all users would have accessed a cached copy of it.

  • What you say makes a lot of sense, given how GA works. I can a page being cached for a few months, but nearly 3 years? Even through updates and a redesign? The code was actually there for a while, but was wrapped with CDATA. I'm guessing it was not actually interpreted, but am not sure. Also there were (and still are) tracking codes on child pages below the library home page which still have the tracking code wrapped as CDATA. See for example this page: link . Is it possible some of the child pages were still tracked?
    – Mike P
    Jul 6, 2016 at 20:37
  • Ah right, the cdata block doesn't disable the JavaScript code. In XHTML documents JavaScript code needs to be wrapped with cdata if Tue code contains any & or < characters which can cause issues with the XML parser used for rendering XHTML documents. Jul 6, 2016 at 23:52
  • That explains a few things. I spoke with the keeper of the university's Google Analytics code. For the previous month they reported about 1800 more pageviews and 830 more unique pageviews than me. I looked at the unfiltered view which counts all traffic both on and off-campus. Since most of the child pages continued to report traffic, it would explain why I saw views for a page with no tracking code. Aren't child page views counted as part of the pageviews for the main site or something similar?
    – Mike P
    Jul 7, 2016 at 17:44
  • Without seeing your reports and code it is hard to say but basically Google identifies web properties by the UA code not by domain and URL structure. If there was a misconfiguration with the tracking code then all sorts of unexpected things can happen. Jul 7, 2016 at 23:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.