Take the 2-minute tour ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

Since the Google Analytics snippet is available in the source code of the page (e.g. below is stackexchange's)

   <script type="text/javascript">var _gaq=_gaq||[];_gaq.push(['_setAccount','UA-5620270-24']);
        _gaq.push(['_setDomainName','.stackexchange.com']);
        _gaq.push(['_setCustomVar', 2, 'accountid', '148108',2]); 
_gaq.push(['_trackPageview']);
    var _qevents = _qevents || [];
    (function(){
        var s=document.getElementsByTagName('script')[0];
        var ga=document.createElement('script');
        ga.type='text/javascript';
        ga.async=true;
        ga.src='http://www.google-analytics.com/ga.js';
        s.parentNode.insertBefore(ga,s);
        var sc=document.createElement('script');
        sc.type='text/javascript';
        sc.async=true;
        sc.src='http://edge.quantserve.com/quant.js'; 
        s.parentNode.insertBefore(sc,s);
    })();
    </script>

I was wondering how Google were preventing people's GA accounts from being spammed. For instance I could modify my /etc/hosts file to point webmasters.stackexchange.com to a server of mine, then on that server I create few dummy webpages with the above GA code, and I could use an automated browser like Selenium to continuously browse these pages and execute the GA code which would generate plenty of requests from my browser to GA.

How does Google prevent people's GA account statistics from being spammed?

share|improve this question
add comment

closed as not constructive by RandomBen May 16 '12 at 12:56

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.If this question can be reworded to fit the rules in the help center, please edit the question.

2 Answers

up vote 3 down vote accepted

there currently aren't any safeguards in place, and while uncommon people can spam your account, for example, if they hold a grudge. If you are spammed you cannot remove this data.

It is best to put in place a precautionary filter, selecting 'include only' and 'traffic from the domains' and setting this to your domain(s) which you want to be included.

share|improve this answer
add comment

So far as I understand it the tag is locked to traffic from a domain/subdomain or group of domains unless you choose the third option in the tag setup.

Referer spam does happen, but what would you achieve by doing this?

share|improve this answer
    
what would you achieve by doing this?: well given how valuable analytics are to any web company for understanding its business I could imagine companies using such techniques against competitors to render their GA account unusable. –  user359650 May 15 '12 at 19:09
    
@user359650 for ecommerce companies maybe, but serious people use more advanced tools than GA. Most of the companies I've worked for over the years are interested, but in nothing more than headline numbers. Anomalous traffic would show up pretty quickly and there really isn't any money in doing this beyond f**king with people. –  toomanyairmiles May 15 '12 at 19:12
    
can you give examples as to what those more advanced tools than GA are please? –  user359650 May 15 '12 at 19:16
1  
@user359650 Market leaders are Omniture and WebTrends, their tags are more scriptable and software generally more configurable. Google limits goal tracking and funnels, doesn't re-analyse data and isn't terribly helpful for very advanced ecom or log analysis. –  toomanyairmiles May 15 '12 at 19:25
    
@user359650 basically Google runs analytics as a way of acquiring better data about sites and as a tool for adsense users, that's really the scope of it's interest. –  toomanyairmiles May 15 '12 at 19:54
add comment

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