iEntry 10th Anniversary SEO
Sign Up Now to Receive SmallSiteNews Newsletter

Can Hackers Access Your Site Through Google Analytics?


Dave Taylor Posted by Dave Taylor

A friend of mine told me that by including Google Analytics code on my site I am leaving open doors for hackers to break into my site and deface my pages or hijack the server entirely. Now I’m kinda freaked out. Is this true?

Dave’s Answer:

This isn’t true, and I don’t know why people think it’s a risk. Google has a ton of smart engineers: do you think they’d have a popular product like Google Analytics (which I run on this site) be something that could be exploited by hackers? I sure don’t.

But to clarify, I asked my friend Bennett Haselton to share his thoughts on this matter. Bennett writes for the programmer/geek site Slashdot, among others, and has a good handle on how people who break into sites exploit weaknesses. Here’s what he said:

Your friend, or his web team, is in the twilight zone or something. It’s not even theoretically possible for Google Analytics to provide a “doorway” to hackers.

When you add Google Analytics code to your website, your webserver just sees that as normal “content” — just a sequence of bytes, like an image or a video file or a text file — and when the user requests it, the webserver sends it to them, just as the webserver sends other content like images and videos. Thus it’s not possible for adding Google Analytics to enable anyone to “hack” your site, because from the point of view of the webserver, it’s just normal content that it sends to the user.

What follows is how I would summarize it for a non-techie audience, although only a non-techie can tell if the explanation is any good :)

What happens when someone goes to your website, if you have a Google Analytics tag on your page:

  1. The user loads your page
  2. The user’s web browser sees that you have a tag on your page. This tag is basically a set of instructions that tells the user’s browser to request some content from the Google Analytics server.
  3. The user’s computer requests that content from the Google Analytics server.
  4. At the end of the month, you as the webmaster, can go to the Google Analytics page and log in to your Google Analytics account, to see how many times a user loaded the content that was requested in step #3. That way Google can tell you how many times the content was loaded, what countries it was loaded from, etc. That’s what Google Analytics does.

Note that in these four steps, there is never a point where any “instructions” (code) are actually run *on* your webserver. After step #1, your webserver is out of the loop entirely. The Google Analytics code is a set of instructions on your webpage, but those instructions (which say “Go and fetch some content from Google’s servers”) are instructions that are followed by your web browser. The Google Analytics code doesn’t tell your webserver to “do” anything.

The only time installing third-party programs onto your website could expose your website to security attacks, would be in the case of programs like WordPress, because WordPress consists of code (instructions) that is actually run *by the webserver*. If the authors of WordPress have programmed it carefully, the code won’t do anything harmful, but sometimes attackers will find ways to exploit it and cause it to do harmful things. In that case you always have to make sure you have the latest WordPress fixes installed.

The distinction between *code* and *content* can help simplify things without having to spend years learning about computer security. It’s what makes it intuitive to see why installing Google Analytics (or an image or a video file) cannot enable anyone to “break into” your website, but installing WordPress could (sometimes) enable a break-in.

Comments

About the Author: Dave Taylor is known as an expert on both business and technology issues. Holder of an MSEd and MBA, author of twenty books and founder of four startups, he also runs a marketing company and consults with firms seeking the best approach to working with weblogs and social networks. Dave is an award-winning speaker and frequent guest on radio and podcast programs. AskDaveTaylor.com http://www.intuitive.com/blog/

3 Responses to “Can Hackers Access Your Site Through Google Analytics?”

  1. hrefdg Says:

    ……….

    Chanukah http://www.alljewishlinks.com Chanukah…

  2. Digital Review Says:

    Thanks…

    I’ve visited many blogs,forums, but this time:How your fantastic forum is . It makes me surprise….

  3. Digital Review Says:

    Digital…

    Great information! I’ve been looking for something like this for a while now. Thanks!…

Leave a Reply


Get Your Site Submitted for Free in
the World's Largest B2B Directory!

* *
*Indicates Mandatory Field | Terms & Conditions