1

I have an Ubuntu server hosting several websites, some Wordpress some just plain HTML, but every single page has the exact same Google Analytics script on it when I view the source in a web browser. I cannot figure out how this is being added to every single site, since some of them are just one HTML page. If you view the source and look at the bottom (just before the ending body tag) you'll see the script.

Here are two of the sites: https://landlinenews.com/ http://enertiadataentry.com/

Is there somewhere, maybe an Apache configuration file, that might have been modified that is adding this?

Kyle Souza
  • 21
  • 3
  • 1
    Are you working from a template with the tracking code in it? Running some third party plugin, module that adds it? – Colt Jun 29 '16 at 15:00
  • You could have something like a [Server Side Include](https://httpd.apache.org/docs/current/howto/ssi.html), but you still would have to have _put something_ on the page to make the include. – Colt Jun 29 '16 at 15:08

2 Answers2

3

Most likely you're using the PageSpeed apache module that is configured to insert your Google Analytics ID with the ModPagespeedAnalyticsID directive or something similar.

HBruijn
  • 77,029
  • 24
  • 135
  • 201
2

If even static HTML files are doing this, then you probably should be looking at Apache. Check first for .htacess files. Maybe try renaming all of them at once if there are any. Then, if you still have a problem, check the Apache configuration, or perhaps look for modules, like mod_pagespeed. It really wouldn't be possible to say without troubleshooting on the server itself, but it sounds like there is a very strong chance that the issue is in Apache.

DKing
  • 826
  • 5
  • 13