TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

MLB.com is using my Google Analytics code

224 pointsby rduchnikabout 11 years ago

29 comments

rduchnikabout 11 years ago
Well mystery solved. I did a bit of sleuthing and noticed they have a scratch card at the bottom of the page. I had written a scratchpad plugin so I did a quick search for &quot;wScratchPad&quot; and sure enough it&#x27;s there. They copied my sample code from <a href="http://wscratchpad.websanova.com" rel="nofollow">http:&#x2F;&#x2F;wscratchpad.websanova.com</a>, div&#x27;s css and all and, you can even see the same `id` and `class` names.<p>I guess they copied a little too much.
评论 #7478774 未加载
评论 #7480027 未加载
评论 #7483041 未加载
评论 #7479409 未加载
rduchnikabout 11 years ago
There is a comment on my blog from a developer from MLB.com for anyone who is interested:<p>&quot;Hi -<p>Engineer from mlb.com here. It appears this goes a bit deeper down the rabbit hole than meets the eye. Apparently there’s some code laying around in our tests run by a CI setup that randomly generates a tracking code to mock third party scripts (Google analytics, ad tracking, etc) instead of using our actual IDs as to not mess with our marketing guys’ numbers (we run a LOT of tests on CI).<p>The strange thing is that your IDs aren’t being pulled from your site, but have randomly been generated the same way many, many times and then been shipped out to our production server by mistake.<p>We can’t figure out why this is happening, but are looking into the build system and how it caches data. Luckily I read HN or we might have never caught this!&quot;
评论 #7478241 未加载
评论 #7478479 未加载
评论 #7478497 未加载
评论 #7482547 未加载
jacquesmabout 11 years ago
One day Microsoft (msn.com) to be exact hotlinked a small gif from one of my servers. Support did not respond at all to my inquiries to <i>please</i> have it removed (the msn.com homepage had a lot more traffic than I was used to dealing with) so I replaced the gif on my server with the &quot;netscape now&quot; button.<p>This was at the height of the browser wars.
评论 #7479675 未加载
dangeroabout 11 years ago
I once hired an offshore developer on ODesk who stole my code and resold it. I discovered he was doing this because he left my analytics code in. Same deal; I woke up one day to analytics showing traffic on a domain I didn&#x27;t own, so I went to look and it was basically a mirror of my site.
评论 #7479570 未加载
评论 #7480569 未加载
评论 #7478023 未加载
jrockwayabout 11 years ago
Good thing the author didn&#x27;t ask for &quot;express written permission&quot; to use his code. The irony would have been too much for me to handle.
评论 #7478269 未加载
gkcgautamabout 11 years ago
@MLB.com<p>But why are you generating those random IDs at all? That means you guys are sending false tracking data to so many websites using those IDs.<p>Stop doing this! Create a different tracking ID for testing or something!!
评论 #7478634 未加载
ApolloRisingabout 11 years ago
For anyone else experiencing this problem what you can do is simply setup a filter in Google Analytics to only allow your domain to add traffic to your google analytics profile.<p>Inside google analytics goto filter, create new filter, select custom filter, select include filter, Enter hostname in the filter field, enter your websitename\.com in the filter pattern box,<p>Apply this filter to your profiles for websitename.com and you should be good to go
评论 #7478483 未加载
dalek2point3about 11 years ago
I wrote an example for graduate students in the US to create a webpage and directed them to look at my webpage for an example template. Now they all copy my analytics tracking code, and I have like tens of student websites that I&#x27;m tracking me. It annoys me. I think we should have some sort of two-way authentication or atleast a way to &quot;mute&quot; certain domains or only whitelist certain domains in the reporting side of GA. Perhaps it exists?
评论 #7477964 未加载
评论 #7478004 未加载
评论 #7477969 未加载
评论 #7478557 未加载
seanalltogetherabout 11 years ago
Back in 2003 Sony Pictures hotlinked some javascript code I had created for handling Flash-&gt;javascript communication. Back then all I could think of was using it to float a dancing robot over their content. These days I guess you can get away with a lot more.
sergiotapiaabout 11 years ago
So you share this hilarious bit and leave out the juicy details!?<p>How large of a spike are we talking about here? Share your digits bro!
评论 #7477977 未加载
bhashkarsharmaabout 11 years ago
One morning, we woke up to see Google Analytics sending us data from an external site. When we opened that link, it turned out to be a clone of our website.<p>They had crawled the entire site (which was designed by our partners) and replaced the logos and text. The GA code was still there.
评论 #7477944 未加载
6a68about 11 years ago
I think it would have been cool to ping one of the MLB.com developers, not write a blog post and laugh at them publicly&#x2F;without warning. Just sayin&#x27;.
ColdHawaiianabout 11 years ago
On a side note, when I visited the blog, it triggered a Web of Trust warning because it got flagged as spam: <a href="https://www.mywot.com/en/scorecard/websanova.com" rel="nofollow">https:&#x2F;&#x2F;www.mywot.com&#x2F;en&#x2F;scorecard&#x2F;websanova.com</a>.<p>It looks like a legit programmer&#x27;s blog to me, so I gave it a full positive review.
terichoabout 11 years ago
Hilarious. You probably aren&#x27;t seeing a huge traffic spike because it&#x27;s a microsite that hasn&#x27;t been launched yet. It also appears to be outsourced or in some sort of BETA since the script management is atrocious. Run a Chrome audit - it&#x27;s only a landing page and still makes 37 different JS file requests &amp; 13 different CSS file requests, none of which are minified. Granted many &quot;professional&quot; sites ignore client-side asset performance but regardless, 120+ HTTP requests for a landing page is laughable.<p>Edit: Might be same shop as mlb.com, they don&#x27;t appear to care about asset performance either.
fekbergabout 11 years ago
Doesn&#x27;t Google Analytics cost money after a certain amount of hits per day&#x2F;month? If that is the case and the gap was hit, would MLB.com be liable to pay the fees?
评论 #7478250 未加载
评论 #7478712 未加载
评论 #7478210 未加载
Brajeshwarabout 11 years ago
People usually steals my designs. Well, I stole better but that&#x27;s another story.<p>I once had my site&#x27;s design stolen complete with my CSS, Javascript errors, the Analytic and the Adsense Code. I think I have the screenshots somewhere on Flickr.<p>The irony was that, mine was powered by a WordPress theme that I designed and was available as a free download.
gk1about 11 years ago
Meta comment: This thread has seemed to attract more nonsense comments -- many are almost entirely whited-out -- than usual. Why? Whatever happened to the endorsement idea?
i_like_robotsabout 11 years ago
I&#x27;ve had this issue too with some of my old, Open Source jQuery plugins and even keeping the scripts separated (into the document head and at the end of the body) and commented didn&#x27;t seem to work. Developers looking for the cheap and easy copy and paste I guess don&#x27;t recognize the difference. Fortunately GA supports simple filtering to mitigate it.
pa7about 11 years ago
I&#x27;ve created an open source project and forgot to remove my tracking code too. The only thing was, I was hosting my own analytics with piwik, so the tracking code came from my domain. Although I marked the code with comments lots of people still left it there.<p>If I was a bad guy this would be an easy and subtle XSS attack vector
vojantabout 11 years ago
I have seen something similar, when three companies stolen award-winning design of digital agency I used to work for. They just copied whole code (including comments in javascript) and changed logos&#x2F;texts but they haven&#x27;t change our ga code.
enterxabout 11 years ago
Reviewing the comments made regarding this and other &quot;Stackoverflow is down&quot; kinda threads I start to wonder... are there so many so-called developers that just copy-paste 9-5?
patmcguireabout 11 years ago
What if I steal your GA code for my app, which has such routes as:<p>&#x2F;I-know-one-weird-trick-to-save-money-on-car-insurance<p>&#x2F;buy-coke
评论 #7478928 未加载
untogabout 11 years ago
FYI (the author, if they&#x27;re here), your site doesn&#x27;t load in Firefox for Android. Not sure why.
评论 #7477877 未加载
评论 #7478771 未加载
评论 #7477924 未加载
nnessabout 11 years ago
I thought GA was tied to specific domains; wouldn&#x27;t GA not track MLB.com traffic?
评论 #7478071 未加载
lurchpopabout 11 years ago
mlb:&#x2F;&#x2F;mlb:mlb@mlb.mlb.mlb&#x2F;mlb.mlb?mlb=mlb#mlb
ChuckMcMabout 11 years ago
Now if you can get them to steal your AdSenseForContent code you are golden!
评论 #7477917 未加载
评论 #7478033 未加载
hanswang2013about 11 years ago
LMAO
z3braabout 11 years ago
Nice unintentionally linkbait.<p>But does their code looks similar to yours?
评论 #7477840 未加载
mahmudabout 11 years ago
Someone done goofed. Google Analytics and other KPI chew-toys and gadgets are what keeps executives busy while people get work done.<p>This will not go unnoticed.
评论 #7477861 未加载