Hacker News new | past | comments | ask | show | jobs | submit login
0 second visits according to Google Analytics (paweljaniak.co.za)
168 points by vidyesh on May 12, 2013 | hide | past | favorite | 57 comments



I believe this article is false.

I have a site that is extremely heavy on front page traffic. Basically 97% of all traffic is front page traffic, and 75% of all traffic is single visit (they hit the front page and nothing else). 55% of traffic does not generate multiple page views on any given day.

I have absolutely no problem with Google reporting 0 second visits. In fact, quite the opposite, Google reports very high visit durations, as visitors tend to spend a lot of time on the front page and then leave. If there were a problem with 0 second counting, it would decimate my time on site numbers due to all the people not generating second page requests for GA to count.

I've been using Google Analytics since they purchased it, and have never run into this problem (across millions of uniques and two dozen sites). The only time I've ever seen 0 second requests on any scale, is from bots, and in that case they're easy to out by looking at flash settings + browser version. If you're seeing a huge number of 0 second requests, it's most likely a bot.


With all due respect that's a long time to use GA without understanding how it works. Here's a good article by Google's GA evangelist I would highly recommend to everybody in this thread who are throwing out anecdotes.

http://cutroni.com/blog/2012/02/29/understanding-google-anal...


Thanks, I think what most people, including adventured, do is to make an assumption about GA and then forge ahead without ever checking it. The link you posted was very illuminating.

Personally, this stresses the importance of measuring events or interactions rather than time on a page. It would be nice to have both but if given the choice, I'd rather have event/interaction data.


I don't think it's false. I have a site with one page, one video. Time on site really is zero seconds. However, playing the video may trigger an event that allows Google to measure some of the visits.


A word of caution: make sure to set the "opt_noninteraction" flag in the event tracking to "true" otherwise your bounce rate will be off.

https://developers.google.com/analytics/devguides/collection...


Honest question here: Why do all this? If there are no secondary source of data that one can observe (subscriptions, adclicks, citations, google link scores...), then why spend so much time and energy on statistics?


I'm not the OP, but I have my own personal blog and a lot of side projects I make $0 money on (I don't use ads).

I use Analytics (Google Analytics, Woopra, GoSquared, and ChartBeat (although never at the same time, that would be ridiculous)) for two main reasons.

1) I enjoy looking at analytical data. Something about charts and graphs just intrigues me. Don't even get me started on the netflow statistics I monitor at my job.

2) It's fun to see how many people are viewing my posts. When I get a post that makes it to the front page of HN or Reddit and I get to see the hundreds of thousands of hits my page gets, it gets me excited to keep posting.


I think this captures it. Its a form of "score" for feedback on an activity, and human nature is such that we like feedback.


Assuming you have a reasonable estimate on the time spent reading an article, the distribution of time spent on the page can be telling as to the quality of the article and how you conveyed the content.

If a reader leaves early that's possibly a symptom of poor writing. If you're lucky, it was just the wrong topic for the reader: no shame in that. If you're unlucky, however, it may be that your content is confronting.

If you have good content but it's not presented properly, you're not going to get value across to the reader. They'll decide to skim read, skip paragraphs, or just leave the page altogether.

In a perfect world, the readers would comment about what was problematic about the article. In the real world, they don't. They don't comment as they don't feel confident to speak about the topic. They don't comment as they don't feel it's worth their time. They don't comment as they don't want to sound stupid.

If average time spent reading a page (culling the outliers) is about the same as what you'd expect to read the article, it's a good signal that you have the right content and the right method of presentation. Authors can use this to help bring content to readers in a clearer and more engaging fashion -- a win-win for all involved.


I do a lot of content based marketing in different market/industries. The type of testing you describe is best used in addition to click-through rates. Due to how presentation and content can be both right, and still get you bad results. How come? The offer stinks. If the offer stinks, then the click-through rates will show. And that's the most important metric of this group that you should pay attention to: how interesting is my offer to the market.


Agreed but that's only applicable when you have a product.

I should have specified that I was coming at this from the point of view that someone's writing a single page article or blog post with no conversion target other than to have it read.

If you're actually aiming to achieve anything concrete with a web page, then the only way to improve that is exactly as you said: directly track conversion to your goal.


I do think one should always have an offer of sone kind. Even if its an email subscription to a blog. That way you can develop a redership for possible future offerrings. Specially useful if you see startup in the near future.


This is measuring something different though. I could have a bad article that heavily pushes an offer and a very good article that doesn't.

The time on page can give you a relative statistic to compare your articles and develop a more engaged readership over the long term, not just optimize to try and sell them something right now.

An example would be something like patio11's posts, some of them are pushing for a conversion but I don't think that each would be best measured in terms of a conversion made right now.


There are three factors you have to keep in mind when writing content: Message (the content), Media (how you distribute it (a blog)), Market (who reads it). The better way of adjusting for those three (optimizing) is to measure conversions on the Message. Otherwise, you are tracking fluff. Of course, my opinion based on experience.


Sounds to me like a version of the Politician's Fallacy. We must measure something, this is something we can measure, therefore we must measure it.


We get a lot of questions at GoSquared (https://gosquared.com) as to why their engagement metrics (and visitor counts) are so different between GA and GoSquared.

Pinging all visitors to check their still online is our solution, rather than making a guess/estimate - this means that sometimes GA reports about 10 visitors online when there are actually more like 100.

This is especially true with HN posts where most people only visit the one page and then leave.

Thanks for the great post :)


Does that mean GoSquared will report a page that has been open for days, taking up a tab but not being actively looked at, as 'online', or is there a timeout after a specific period of inactivity?


I don't know about GoSquared, but I built a similar real-time dashboard for W3Counter [1] that operates the same way. It would include that visitor as long as the tab is still open, but it also shows how many visitors are idle versus writing or reading (recently scrolled or moved the mouse, which requires the tab be in the foreground), so you know how many are just sitting in tabs.

1: http://www.w3counter.com/features/pro


We monitor if the page is focused or blurred, so you can get both metrics in real-time.


4th solution: GA breaks the segment of 0-10 into 0 (or N/A) and Greater than 0 - 10 Seconds

Problem solved.

The other proposed solutions do help to show engagement but requires more knowledge of how to implement, this 4th solution helps to KISS


This is a very good solution. Anything more than 0, i.e. 0.05s would be rounded up to 1s and 1 would always be the minimum for non-zero points.


Also, over a certain amount of traffic Google Analytics will just extrapolate the numbers up rather than actually recording every visit.

If you don't want this to happen, there are plenty of other analytics services out there. I'd recommend GoSquared, but I did work for them last year, so I'm biased in that recommendation.


From personal experience I used to be very discouraged that users spent seconds on my site until I read up a bit more on why it was being reported that way.

My fix was to "ping" GA with an event every 60 seconds. This results in about 55,000ish pings a day and has made my average time on site a little more like something I'd expect off a music streaming website(http://www.tubalr.com). My average time on Tubalr is around 1 hour with the new event tracking I'm doing.


I'm surprised they don't have a timer running that pings themselves every N seconds. The ads all do that. Pinging themselves on visibilitychange or beforeunload could also be helpful (though there will always be people who disconnect without warning, which is why you ping periodically if you care about time spent as a metric).


Great idea, but why do we require real-time and user-impacting statistics in the first place?

Why not place a AJAX script to a local session monitor that stores up details about a visit and flushes the results via hits to GA? That way, a user doesn't have to wait for GA to load on a page (I've see it be the majority of load time on many websites). The AJAX script could be tied to all types of events such as mouse movement (people hover over links, images, ect. without clicking so capture that as interactivity), onFocus events, and in future eye-tracking events.

This could be built up as a off-screen buffer that generates a more detailed session and fires it off to AG in near-real-time. One other important factor could be to label the events in a concatenated nomenclature so that home.hover, home.idle.30s, home.unFocus, home.gaze.rightMenu.17s, and home.scroll.down.x143 all make sense.


Can I get some feedback on the following idea please:

- Maintain an open (but idle) websocket connection on your page to have an accurate real-time visitor information. The websocket should remain open as long as the user doesn't close the tab or navigate away.

What are some cons that prevent everyone from doing so?


I have many tabs open that I'm not actually "on." I just took a shower and left HN open, for example. Can it detect that the tab is "active" or "focus?" That may help. But I'm not sure this is a problem worth a ton of work. It's, at best, a proxy for measuring things like interest.


    document.addEventListener('visibilitychange', onVisibilityChange);


Yeah, as you say, even if it just tells if a tab is open (active or inactive), that's already a good measure of interest.

But I think it may be possible to determine if the current tab is open with some javascript, and send that information through the websocket. Edit: what bsimpson said.


~50% of visitors don't have websocket support, and there is not, afaik, a free service offering such, and otherwise, it is probably not straightforward enough for the 99% to setup.


You can see a sample in action here [1]. The page should list every single person in the world (whose browser supports websockets) who is currently on that page. You can open multiple tabs and see that whenever you close/navigate away, your corresponding entry will disappear.

[1] https://dl.dropboxusercontent.com/u/8554242/live-status.html


Error: TypeError: sock is undefined

Ubuntu, Firefox 20.0


I just debugged this. The issue is that Firefox doesn't allow insecure websocket connections from https.

So either change the url to http://dl.dropboxusercontent.com/u/8554242/live-status.html or override the network.websocket.allowInsecureFromHTTPS setting in about:config to true.


Everyone does do so already (though not necessarily with websockets; occasional pings are sufficient and more widely supported). Google Analytics has a real-time dashboard. So do most web analytics platforms these days.


How do you ping a browser? Where can I find more info about this.

I figured the real-time dashboard of Google Analytics must be doing something similar, but I don't know what exactly they use.


The browser pings the server.

    setInterval(function() {
        $.ajax('http://analytics-site.com/ping?page=' + window.location.href);
    }, 5000);


Ah, makes sense, thanks.


GA realtime does not differ in tracking methodology, it uses the same onload beacon, just like the long-tail reporting.


At lognormal/mPulse, we have boomerang set up to send a beacon on page load and on page unload. The unload beacon tells us when someone has left the page. If they go to a new page, the next load beacon overrides the previous unload, else the unload tells us how long they stuck around.

It's been pretty reliable. All current browsers will make a GET request in the onbeforeunload event (onunload in Opera). Firefox is the only one that blocks the next page's load until a response is received, and Opera is the only other browser that handles the response though it doesn't block while waiting for it.

Our primary motivation is to measure session engagement (bounce rate, conversion, duration, pages, etc.) versus average page load time across the session.


This happens a lot with landing pages because many times there is no 2nd page view as people don't convert. In landing pages this metric is super important. If a person left after 5 seconds your page is probably ugly. If a person leaves after 1min your content might not be convincing enough or no clear call to action. You need to know when people usually leave your page in order to know how to fix it. In http://www.pagealizer.com/ we track the time spent on page (beside other metrics) by pinging the visitor.


I block google analytics with noscript. No downside for me.


Well, there's a downside in the sense that no-one will ever see how you use web sites, so when they change their behaviour and break functionality you used to use, you'll have no-one but yourself to blame.


Is that the best argument you can make for why he should turn GA back on?

If so, I think I should block GA to reduce the length of the interval of unresponsiveness while the "on load" JavaScript runs.


What other argument can there possibly be? The benefits to the individual aren't huge. And you're welcome to block GA, I'm just trying to make the point that there is a purpose behind analytics, and it isn't just a sinister conspiracy to take over your life.


I'm sympathetic to the purpose -- I'm less protective of privacy than most here.

My objection is to the means, namely, giving the page's author essentially unlimited access to compute resources on the browser and hoping the author will choose to be moderate.

Until 2008 I browsed the web on a slow machine (Celeron based on a PIII core, probably made in 2000 since the BIOS copyright notice referred to the year 2000) and blocking GA on that machine very drastically reduced the amount of time the browser was unresponsive. So much so as to suggest that even on modern fast hardware, there will probably be some improvement in responsiveness even if the difference will not be immediately noticeable to the user like it was on my old machine.


I don't like google and/or facebook having their tentacles reach out on far more websites than their own. I'm against centralized data gathering, even if it's futile in this world..


If you live in the EU, Facebook are not allowed to use the data gathered from their like buttons for advertising purposes, by order of the Irish Data Protection Commissioner.


A very very small price to pay for some sense of privacy online.


Google Analytics is like loyalty cards for the web: they track user behaviour for the benefit of the service provider, not the consumer. But a "real" loyalty card at least pretends to serve the user by offering an occasional special deal or some savings, as opposed to added cost (bandwidth, load times etc). I vote with Ghostery.


We added a page ping event into Snowplow for this exact reason. Tracking user activity on the page, including where/when the user scrolls around the page, yields a lot of interesting data, including average % of page read, by page:

http://snowplowanalytics.com/blog/2013/04/18/measuring-conte...


I wonder why Google does not track the time to an event fired on another Google Analytics site. While it might yield strange results if the user closes the browser or opens a page without Google Analytics, it would provide quite accurate results. Of course, this only works if most websites use GA.

Also, I am not a web developer, but is it not possible to specify another GA event in the onbeforeunload function?


What is a visit is it the search time or the time I am on the page?

I know I have searched for things that seem to take a long time (when I am in a rush) but the results page show my search took e.g. 0.22 seconds when really the page may have loaded slow or I had to reload the page taking maybe 30 seconds or Google Instant is being annoying.


That's the time Google spent preparing the result page for your search (finding and sorting the matching results). Actual time between you making a search and seeing that page involves much more than that computation, such as network latency and time to transfer the HTML.

Did you read this submission? It's not about Google search results. It's about how the time-on-site metric in Google Analytics is computed.


A visit is the time you are on the page (that is, not including any time you spent on Google or your favorite social network finding a link to the page). Which makes sense - the length of a visit to a physical place doesn't count the time you spend looking up its address while you're at somewhere else entirely.


I'm coming to the conclusion it's best to write your own Analytics if you want reliable and precise information. Google Analytics is an out-of-the box solution targeted at websites between 1 and 1000000000... visitors per month. (Regardless whether it's a blog, an online game or you name it.)


I feel like I'm missing something here. Surely you can get an accurate time with some simple Javascript? There is the onbeforeunload event, and you could always do polling.


Time on page is a vanity metric. Actions are what you need to grow. Metrics for pirates! Piwik is what I've been using, like it a bit more than GA




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: