Detect if visitors are logged into Twitter, Facebook or Google+

|

95 responses to “Detect if visitors are logged into Twitter, Facebook or Google+”

  1. Tom, this is great, tx!
    Your last point about determining if to support that social network is the crux for me, so lets say you want to gather the evidence for management for intelligence based decisions? Use Dennis Paagam’s GA event tracking call addition to the script and generate the reports in Analytics. See his post for details http://devblog.springest.com/how-to-find-out-if-your-users-are-on-facebook especially piece about preventing the bounce skew.
    Lastly, are you able to detect if user is YouTube logged in also?

    1. Just wait until a gmail account is the only way to log into youtube and then gmail account equals youtube account 🙂

  2. It gets it backwards for me. Tells me I’m logged in to services that I’m not currently logged in to, and tells me that I’m not logged in to services that I am logged in to.

    1. Note that the text colour is confusingly red for logged in and green for not logged in.

  3. Safari on iPad says im logged in to all 4 services. I only have google and google+.

  4. Doesnt work for me.
    Computer says:
    – NOT logged in: Facebook, Twitter, Google+
    – Logged in: Google

    Reality is: I do not have a google account and I am currently logged in into Facebook (another tab).
    I am using Fireforx 10.0.2 and AdBlockPlus.

    Script doesnt work!

    1. Hi Stefan,

      I imagine it is AdBlockPlus that is screwing it up – as the demo page mentions, some extensions will block this from working. You don’t have any Google account? No YouTube account or Gmail?

      Thanks for the feedback. 🙂

      1. It works for me (with AdBlock Plus)

  5. […] background-position: 50% 0px; background-color:#222222; background-repeat : no-repeat; } http://www.tomanthony.co.uk (via @eklaus) – Today, 12:20 […]

  6. Thanks for a great post.

    It seems to work fine for me on Chrome. It got everything right… Not logged in anywhere.
    How could we then gather all this information in a useful manner? Can this report be integrated to GA?

  7. Sorry to be rude but this is so damn old. I saw this like 1 1/2 year ago on another blog so I really don’t get the buzz here.

  8. Notable that it doesn’t detect the networks as logged in when I use hootsuite…

  9. Okay, it’s less than a year old, but still:

    https://grepular.com/Abusing_HTTP_Status_Codes_to_Expose_Private_Information

    Once you’ve gained a little knowledge about Http it’s really nothing special.

    1. Hi Christian,

      You’ll notice that I link to that exact post in my article, and I also point out that it doesn’t work on Internet Explorer (any version), and doesn’t provide any method for Google+ either. The HTTP code trick doesn’t work with IE, and so the technique used here is completely different.

      Thanks for taking the time to comment. 🙂

  10. Thanks for the share. More importantly, thanks for pointing out ScriptNo for Chrome. I just recently switched back to using Chrome and didn’t have that extension yet.

  11. I think this is badass.

    I personally think it can have massive implication if you are able to deliver content based on the user needs.
    We currently reward users with discount vouchers for liking our page on Facebook and working on the script for Google Plus and Youtube Subscribers.
    I would be looking at displaying this message in a manner that states:

    “Hey, you not logged in Facebook. Did you know if you log in you can get ………”

    or

    “Great you logged in to Facebook. Click the ‘Like’ button below and download your……”

    Azzam

  12. […] background-position: 50% 0px; background-color:#222222; background-repeat : no-repeat; } http://www.tomanthony.co.uk (via @seotweetz) – Today, 1:50 […]

  13. IE blocks this with tracking protection BTW

  14. […] background-position: 50% 0px; background-color:#222222; background-repeat : no-repeat; } http://www.tomanthony.co.uk – Today, 9:39 […]

  15. Shit Happens! I don’t like this, but I have installed ScriptNo 😉

  16. You don’t need to make your web looks like crap by using NoScript. Just disable third party cookies in your browser’s privacy settings and this kind of detection won’t work.

  17. This is great! I found this on SEOmoz. Do you know if there is a way to capture and push linkedin information as well?

  18. Thanks for the info about RequestPolicy. Never heard of that before.

  19. The demo shows, that I’m logged in to FaceBook, Twitter and GooglePlus, but I do not even have an account on one of these. I’m using Firefox 10.0.2 on Linux Mint 12 with no noscripts-addon installed.