So the question is, how can I know someone is not sending events (pageview events or whatever) using my tracking ID? Is there any way in GA to filter those, before or after GA stores them?
1. Yes, Google Analytics can be quite useless if you keep default settings with no configuration.
2. That doesn't mean you should jump straight to a self-hosted solution, or a paid solution, or throw up your hands and say "it'll never be accurate."
For most use cases, GA is more than good enough to measure effectiveness of online marketing efforts. Dismissing it outright in favor of a paid or self-hosted option just because you didn't google "how to prevent analytics hijacking" is bad decision-making.
/rant
Now on to the fix...
You can create a filter in your GA view settings to ignore tracking calls from any hostname other than your own. See here: https://support.google.com/analytics/answer/1033162?hl=en
PS - No client-side analytics will ever be 100% accurate, certainly not GA. But for the purposes of measuring marketing efforts and results, you can have greater tolerances. It's a tool for marketing, not logging.
Usually the answer is gk1's above and keeping an eye on server logs to see if they match up with the client analytics data you're getting. You can even have events sent from both in GA or Piwik or whatever so you can compare them in the same UI, looking at e.g. event flow so that everyone who loaded some data first triggered a fetch event on the server for that data. Of course then your attacker can just get a botnet to start mindlessly doing page views of your site...
"semalt\.|social.?buttons\.|hulfingtonpost\.|best-seo-(solution|offer|service)|free.traffic|buy-cheap-online|prodvigator|cenokos\.|ranksonic\.|adcash\.|share.?buttons\.|blackhatworth|buttons-for.?website|darodar\.|100dollars-seo"
To help keep down the spam.
See https://news.ycombinator.com/item?id=7477736 or https://news.ycombinator.com/item?id=8869880
I guess SEO people already know this, the question is: can you trust a SEO consultant?
Use something like http://zoomrank.com/ to monitor the position of your site in the various search engines over time; establish a baseline, hire the SEO consultant, and look at your placement graphs. Did you fail to improve, or even go down? Then don't pay the snake oil salesman.
GA is really not a product you want to trust your business with. Best approach is to consider self-hosted analytics solutions.
I built my own for my needs which also include combined features for security analytics to investigate malware attacks. GA is totally useless in this aspect.
Of course it is, it's a marketing analytics tool. It's totally useless for many things that aren't related to marketing.
As said, this will remove all data points which are usually gathered by the GA-Javascript. Same thing is possible with Piwik.
You _could try_ to have custom JS that would gather those data-points like e.g. screen resolution.
note the: how to stop referral spam url
Also, with the increasing spam coming from referrer and the new trend of adv blocking plugins (they block GA too), Google Analytics has become less reliable than ever.
However, you can setup open source analytics software on your own server, like [Piwik](http://piwik.org/).
what blows my mind is that they aren't doing more to fight the referral / event tracking spam. it's totally out of control.
Anyway, looks like the best option.
Screwed up a huge amount of our click tracking data on GA.
var outboundLink = function(url) {
ga('send', 'event', 'button', 'click', {'hitCallback':
function () {
document.location = url;
}
});
}
<a href="#" onclick="outboundLink('https://www.foo.com'); return false;">Foo</a>
See: https://developers.google.com/analytics/devguides/collection... ga('send', 'event', 'button', 'click', {transport: 'beacon'});
This will work even after you redirect to another page but only if the browser supports navigator.sendBeacon(). Currently not IE or Safari.There are solutions, but they're all pretty unpleasant. The most common is to use an onclick handler on your outbound link that only navigates after the tracking event has been fired. Google Analytics cover this in their own documentation here: https://support.google.com/analytics/answer/1136920?hl=en