Take the 2-minute tour ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

I am creating an app that requires to know if the visitor visiting the app is a unique visitor or an already visited visitor. I know we could persist a cookie on the visitor's computer to know identify this.

What I would like to understand are the different other ways that can be used to know to keep track of unique and existing visitors? How does Google Analytics know whether it is a unique visitor or an existing visitor?

Can I use browser fingerprinting (https://panopticlick.eff.org/) to know unique visitors/ existing visitors?

share|improve this question
    
possible duplicate of What is the difference between Visitor and Unique Visitor? –  bybe Apr 5 '13 at 19:14
2  
My question is not about what is a visitor and a unique visitor, but what are the diff ways to know technically if a user is a visitor or a unique visitor when a site is visited. –  Abishek R Srikaanth Apr 5 '13 at 19:43
add comment

2 Answers

up vote 2 down vote accepted

Unique visitors are identified by GA using the __utma cookie set by analytics. Here is a official article on Cookies used by GA. You could refer to these cookies by reading them using your server side script.

If you have a login system in your app, you could try setting a customvariable as the user id (which would be unique). Here is the document on Custom Variables in Google Analytics.

share|improve this answer
    
So, if the cookies are deleted, then GA identifies it again as a Unique Visitor? –  Abishek R Srikaanth Apr 6 '13 at 7:39
    
Yes. Also, if the user opens the app using two different devices or browsers, then GA will also tag them as different unqiue visitors. There is a separate article on Universal Analytics (which supposedly addresses this issue (support.google.com/analytics/answer/2817075). Although I must confess that I do not have any hands on experience with UA. –  Prasad Apr 6 '13 at 8:56
add comment

If you are rolling your own...

Just to clarify... I think most tracking systems will see the user agent (browser) as the "visitor". It's not possible to track real people unless you have some authentication/login in place. Most normal users will tend to use just one browser, but often on more than 1 device these days - so 1 real person is likely to equate to more than 1 visitor.

The IP address alone is not sufficient, since it can be shared by many many users (behind NAT).

So, if you reside to the fact you are tracking user agents then, in an ideal world, the cookie is king. However, not every user agent supports cookies (or has them enabled) - robots, for instance, generally do not have cookies enabled. So, unless you are filtering this traffic by some other means (by analysing the user agent string for instance) then your visitor stats are going to be seriously skewed.

A simple way to workaround the no cookie issue is to fall back to checking user agent string + IP address. Checking a browser fingerprint is a bit overkill in my opinion, and possibly too slow.

Bear in mind that no one system is perfect. Different systems tend to return different results depending on what they consider a visitor to be.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.