News for hackers. Stuff that matters.
Re:Show HN: Mirrorshades – Simple web analytics by ttd on Monday February 20, 2017 @10:14AM (#13687901)
For such simple metrics (visitor count and referral), wouldn't it be possible to use server-side tracking, e.g. by parsing an Apache access log? Are there any packages out there to do simple analytics without requiring client-side tracking?
Re:Show HN: Mirrorshades – Simple web analytics by tyingq on Monday February 20, 2017 @10:30AM (#13688048)
Webalizer, awstats, goaccess.

Goaccess is interesting in that it has both a live, terminal, curses interface as well as HTML output. https://goaccess.io

Re:Show HN: Mirrorshades – Simple web analytics by StavrosK on Monday February 20, 2017 @10:48AM (#13688196)
I've actually writing a post these days about this exact thing: Analytics alternatives to Google Analytics that are more private, more accurate and faster. It's a very interesting topic, GoAccess is my software of choice but it has some odd UX that is currently being worked on by the maintainer.
Re:Show HN: Mirrorshades – Simple web analytics by purrcat259 on Monday February 20, 2017 @01:06PM (#13689443)
I recently started a small project similar to goaccess, which brings up some quick statistics from nginx access logs, though nothing as polished as that!

https://github.com/purrcat259/peek/

Re:Show HN: Mirrorshades – Simple web analytics by rhizome on Monday February 20, 2017 @01:53PM (#13689858)
Analog also has an ad hoc reporting interface: http://www.c-amie.co.uk/analog/
Re:Show HN: Mirrorshades – Simple web analytics by davidcollantes on Monday February 20, 2017 @10:54AM (#13688250)
Wow, `goaccess` is beautiful! Thank you for sharing.
Re:Show HN: Mirrorshades – Simple web analytics by pwenzel on Monday February 20, 2017 @12:21PM (#13689012)
Good point, but there are quite a few sites nowadays that are hosted on platforms with no immediate access to raw Apache logs, especially if your site is served by a CDN.
Re:Show HN: Mirrorshades – Simple web analytics by lettersdigits on Monday February 20, 2017 @11:32AM (#13688579)
> http://getmirrorshades.com/view.html?siteKey=[SECRET_SITE_KE...

someone sniffing the network traffic can see the SECRET_SITE_KEY .. isn't it a security concern? or am i missing anything?

Re:Show HN: Mirrorshades – Simple web analytics by aparks517 on Monday February 20, 2017 @11:45AM (#13688684)
Thanks. HTTPS is now live. :)
Re:Show HN: Mirrorshades – Simple web analytics by lettersdigits on Monday February 20, 2017 @12:11PM (#13688910)
i think it's not enough:

one of the comments of the question here: http://stackoverflow.com/questions/499591/are-https-urls-enc...

says: "It's probably a bad idea to put confidential data in the URL anyway. It will be displayed in the browser's address bad too, remember? People don't like it if their password is visible to anyone who happens to glance at the screen"

you can just display a form with an input field for the secret key, which will be HTTP POSTed and only THEN you should display the account's data (while the url doesn't disclose the secret key)

Re:Show HN: Mirrorshades – Simple web analytics by bencollier49 on Monday February 20, 2017 @11:59AM (#13688799)
But you've got the secret site key in your server logs as it's in all the GET statements. Don't use third-party log analysis would be the suggestion I suppose.
Re:Show HN: Mirrorshades – Simple web analytics by lettersdigits on Monday February 20, 2017 @12:12PM (#13688923)
i didn't even think about that angle (being careful from third party logs for http GETs with sensitive info in the url). thanks
Re:Show HN: Mirrorshades – Simple web analytics by iDemonix on Monday February 20, 2017 @11:01AM (#13688313)
Out of interest is this just a permanent side project that's almost completed, or something you're hoping to grow and monetise?

Also, what stack are you using? I'm interested as I've been slowly designing my own mini project (with SaaS aspirations, SaaSpirations?) that does very similar metrics.

Re:Show HN: Mirrorshades – Simple web analytics by kapuru on Monday February 20, 2017 @10:04AM (#13687820)
I think I'm in love.

I just recently switch from GA to Gauges, because the referral spam and bloat was annoying me.

I'm definitely going to use this on my next project. Simple and beautiful.

Thanks for sharing!

Re:Show HN: Mirrorshades – Simple web analytics by foxhop on Monday February 20, 2017 @04:22PM (#13691035)
I'm still running google analytics but I don't look at it anymore, the spam is unbearable and I don't have time to figure out how to create filters. Its not my problem to figure out either. I'm really excited for Mirrorshades. Keep it simple.
Re:Show HN: Mirrorshades – Simple web analytics by fiatjaf on Monday February 20, 2017 @06:00PM (#13691810)
I'm developing a simple web analytics also (it's strange to see Mirrorshades here since I started developing something like it some weeks ago) and I want to know about referral spam: Mirrorshades per se doesn't have any better spam filtering than Google Analytics, right? The gain from switching to it is just because spammers still don't know how to spam Mirrorshades, or am I wrong?
Re:Show HN: Mirrorshades – Simple web analytics by aparks517 on Monday February 20, 2017 @07:19PM (#13692192)
Spammers are already doing what they do. I have rudimentary measures in place, but additional data will enable a more sophisticated response. I use the service myself and find spam to be crazy-making. So... ;)
Re:Show HN: Mirrorshades – Simple web analytics by fiatjaf on Monday February 20, 2017 @08:25PM (#13692497)
How are they doing what they do? How could a spammer get to know Mirrorshades protocol to send a false referrer report (which is not the Referer header) in an AJAX request?
Re:Show HN: Mirrorshades – Simple web analytics by aparks517 on Monday February 20, 2017 @09:07PM (#13692657)
At least some of them appear to use a more general-purpose method than that. They actually load pages and execute scripts with document.referrer and the Referrer header faked-up. Though it's presumably more resource-intensive, it has the benefit of working for a wide variety of analytics setups, both hosted and server-side.
Re:Show HN: Mirrorshades – Simple web analytics by fiatjaf on Monday February 20, 2017 @10:31PM (#13693040)
Oh, right, they just got document.referrer, I had forgotten about that.

What if the analytics server actually parsed the referring page to see if there's a real link there and only confirm the referrer after that? Isn't there a third party service that checks these things?

Re:Show HN: Mirrorshades – Simple web analytics by iDemonix on Tuesday February 21, 2017 @04:01AM (#13694301)
If I send a manual PATCH of {"source":"referral-spam-here.com"}, obviously it makes it in to my metrics.

It seems like someone could just scan for sites with a site ID matching your format, then a quick burst of 100 PATCH requests and you're now experiencing the same stuff that makes Google Analytics so painful to use.

Do you have any plans to combat stuff like this? This is typically my biggest gripe with analytics platforms, the spam can make them unusable and is hard to protect against.

Re:Show HN: Mirrorshades – Simple web analytics by aparks517 on Tuesday February 21, 2017 @07:12PM (#13701578)
Yes. I have basic measures already in place and a good idea of additional steps I would like to take.
Re:Show HN: Mirrorshades – Simple web analytics by fiatjaf on Tuesday February 21, 2017 @07:42AM (#13695028)
Do you have a suggestion?
Re:Show HN: Mirrorshades – Simple web analytics by fiatjaf on Monday February 20, 2017 @10:11AM (#13687876)
Re:Show HN: Mirrorshades – Simple web analytics by myfonj on Monday February 20, 2017 @10:21AM (#13687956)
Try HTTP [0].

It seems to be small enough to not even link it but paste in the HTML (836 bytes uglified, supposedly golfable even further).

[0] http://getmirrorshades.com/agent.js

Re:Show HN: Mirrorshades – Simple web analytics by aparks517 on Monday February 20, 2017 @10:21AM (#13687953)
Oh! Sorry about that. Should be fixed shortly.
Re:Show HN: Mirrorshades – Simple web analytics by e12e on Monday February 20, 2017 @11:06AM (#13688354)
http://getmirrorshades.com/agent.js

Does look nice and clean - but I would love to see a license, not just a copyright notice. I am unsure if such a short snippet really is copyrightable? It is tempting to just change the post url and whip up something simple for self-hosting... but tricky to do and redistribute as long as there is no license on the file. For such short snippets I would recommend cc0 - or perhaps bsd.

Re:Show HN: Mirrorshades – Simple web analytics by TheFullStack on Monday February 20, 2017 @12:26PM (#13689056)
The simplicity of this is pretty compelling. I use GA a lot and it can definitely be a time-sink. Mirror Shades may be a good alternative for beginners who are overwhelmed by GA or for simple landing sites that don't need the full GA suite right away. For my next landing page test, I'll try Mirror Shades out.
Re:Show HN: Mirrorshades – Simple web analytics by idoco on Wednesday February 22, 2017 @04:13AM (#13704234)
I really love the simplicity, I think I will use it for one of my side projects! (also here at Show HN)

Quick question, why did you choose to use a PATCH request and get involved with CORS issues, instead of injecting an image element with a tracking pixel (web beacon)?

Re:Show HN: Mirrorshades – Simple web analytics by thangngoc89 on Monday February 20, 2017 @09:47AM (#13687638)
Ask HN: Is there any services that take my Google Analytics report and produce a simple report like this one? I may not need the full-blown report of GA right now but I guess I'll need it as some point in the future.
Re:Show HN: Mirrorshades – Simple web analytics by tyingq on Monday February 20, 2017 @09:56AM (#13687732)
You can reproduce it within GA using a custom report, something like this: http://imgur.com/a/DDzdc
Re:Show HN: Mirrorshades – Simple web analytics by mcescalante on Monday February 20, 2017 @09:59AM (#13687770)
I have successfully used https://briefmetrics.com/ before with clients who couldn't be bothered to learn the GA dashboard and wanted reporting. I have also used the "email dashboard on a schedule" and made a simple dashboard but briefmetrics has a better experience.
Re:Show HN: Mirrorshades – Simple web analytics by portablemarko on Monday February 20, 2017 @09:52AM (#13687684)
look at Google's data studio https://datastudio.google.com/
Re:Show HN: Mirrorshades – Simple web analytics by chrisma0 on Monday February 20, 2017 @01:06PM (#13689442)
Neat! agent.js initially failed on my site, as it wasn't the last script on the page and siteId was set to null (line 14):

  var siteId = scriptElements[scriptElements.length - 1].getAttribute('data-siteId');
Maybe that could be better documented?

Alternatively a change in the way that the script element (and the siteId) is detected could be helpful (instead of lines 13, 14):

  var siteId = document.querySelector('script[data-siteId]').getAttribute('data-siteId');
Re:Show HN: Mirrorshades – Simple web analytics by aparks517 on Monday February 20, 2017 @03:04PM (#13690410)
Thank you! This was very helpful feedback. I added the async attribute to the script tag late in the game and didn't think about how it would interact with this. I've updated the agent script with a more robust method of finding the site ID and am deploying it now.
Re:Show HN: Mirrorshades – Simple web analytics by assafmo on Thursday February 23, 2017 @04:21PM (#13717897)
Awesome! I was just having problems opening a GA account and then I fount this Show HN. This is exactly what I was looking for - fast and easy setup, updates instantly, simple and exactly the two metrics I am interested in.

I've already started using it and I'll send feedbacks along the way.

Good luck!

Re:Show HN: Mirrorshades – Simple web analytics by thenomad on Monday February 20, 2017 @10:35AM (#13688091)
Minimal and cool. Nice.

Some kind of top pages or top bounce rate stats would also be good. Usually I'm using analytics to figure out either a) what's working or b) what's broken.

Re:Show HN: Mirrorshades – Simple web analytics by aparks517 on Monday February 20, 2017 @10:55AM (#13688259)
I'm eager to keep that stats page small, but at the same time I'd like it to have what people need to see. So this feedback is particularly valuable to me and I've made a note of it. Thanks!
Re:Show HN: Mirrorshades – Simple web analytics by mahesh_rm on Monday February 20, 2017 @10:56AM (#13688272)
Neat. How can I send custom data from here: `// Data to send var payload = JSON.stringify({ source: source, ip: 'trying_ip' }); `?
Re:Show HN: Mirrorshades – Simple web analytics by feistypharit on Monday February 20, 2017 @09:57AM (#13687755)
Looks interesting, awesome to see more Michiganders too!
Re:Show HN: Mirrorshades – Simple web analytics by kyriakos on Monday February 20, 2017 @10:16AM (#13687919)
Benefits over ga? Honest curiosity
Re:Show HN: Mirrorshades – Simple web analytics by robinhood on Monday February 20, 2017 @10:31AM (#13688053)
Seems obvious: simplicity, no setup required apart from pasting one line of code.
Re:Show HN: Mirrorshades – Simple web analytics by softawre on Monday February 20, 2017 @10:59AM (#13688294)
Isn't GA just one line of code too?

The only benefit I see is that Google doesn't have the data.

Re:Show HN: Mirrorshades – Simple web analytics by overcast on Monday February 20, 2017 @12:11PM (#13688908)
Well, it's multiple lines of data, but yes, it's just a simple copy/paste.
Re:Show HN: Mirrorshades – Simple web analytics by orhanbayram on Monday February 20, 2017 @12:09PM (#13688885)
What are the benefits over Google Analytics or Piwik or Countly?
Re:Show HN: Mirrorshades – Simple web analytics by fiatjaf on Monday February 20, 2017 @12:11PM (#13688917)
It's explained at the link, if only you could read.