Google Analytics & Misplacing Code

Aug 30, 2006 • 7:56 am | comments (5) by twitter Google+ | Filed Under Other Google Topics
 

For those of you that use Google Analytics, you should be aware that if someone steals your source code and leaves your "UA" code, the unique identifier for Google to know what site the traffic is from, that your traffic may be inflated.

The code you place on your site looks like: <script src="http://www.google-analytics.com/urchin.js" type="text/javascript"> </script> <script type="text/javascript"> _uacct = "UA-######-#"; urchinTracker(); </script>

Now, the ######-# is replaced by a unique number that tells Google Analytics who you are. Sometimes when scrapers pull your content, they pull everything.

So just keep this in mind...

Forum discussion at DigitalPoint Forums.

Previous story: Google's CEO, Eric Schmidt, Joins Apple's Board of Directors
 

Comments:

Philipp Lenssen

08/30/2006 06:34 pm

Google doesn't check against the domains you defined?

Barry Schwartz

08/30/2006 06:50 pm

I don't think so. I had a client that gave me the wrong code... He gave me his personal site Google A code and we placed it on the corporate site. He noticed a crazy spike in his traffic on his personal site. Then he dug deeper and noticed it was the wrong code...

James Pederson

08/30/2006 09:12 pm

No they don't confirm the domain (first hand experience). Found out while I was just messing around testing it. The reason they probably don't do that is because there are TONs of sites out there that are mirrors of other sites, and many times, people want to see traffic stats for both sites at the same time. In that situation, this is more of a convenience than a downfall. However, I think they should have an area in settings where you can choose which domains you want to allow. Though it's very easy to tell when you have inflated numbers (when you see keywords you aren't targetting), it's much more difficult to try and get rid of them. Nice post.

Andrew Hitchcock

08/30/2006 10:33 pm

If you go to Content Optimization - Web Design Parameters - Hostnames, you can see which hostnames that use your code have the most hits. The majority of my hits are for my domain, but I get about half a percent of hits from Google's and MSN's caches.

Phil Bradley

08/31/2006 11:08 am

I had this exact same thing happen to me a while back. Some guy lifted my home page coding straight off the page and just changed the content he understood, but was too dense to cope with the Google scripting, so just left it there. Didn't take any time at all for it to come up when I was checking my stats. I just emailed him to say 'ok, I get that you're sad and incompetent enough to steal my code, but can you at least take out the scripts?' :)

blog comments powered by Disqus