I have added my GA tracking code to a website which is hosted via a GitHub public repository and I am concerned that, using my account number, they could effectively "hack" my GA account.

Is this unfounded nonsense or is there some truth behind my paranoia?

  • You just checked in your Analytics JavaScript snippet, right? Nothing that you wouldn't put in the source code of a website that was hosted elsewhere that anybody could view with "view source" – Stephen Ostermiller Nov 27 '14 at 18:16
  • @StephenOstermiller true that – Sammaye Nov 27 '14 at 18:21
  • They can't "hack" your account. What could be done is that people can start calling the GA methods sending data to the GA storage engine that you do not want (e.g pushing a custom variable or an event). – Prasad Ajinkya Nov 28 '14 at 13:03
  • @Prasad though then they could do with the source code. I guess I have never seen it done since there isn' really much point. Not really a funny or money earning thing to do – Sammaye Nov 28 '14 at 13:41
  • @Sammaye true that! – Prasad Ajinkya Nov 29 '14 at 5:14

The tracking code on its own is not a security risk. Remember, anyone can see this simply by viewing the HTML source of your website.

If you're putting your website code on Github because you think other people could use it, you shouldn't include your tracking code because you don't want their visitors to be logged to your account.

  • Should have remembered that one :) – Sammaye Nov 27 '14 at 18:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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