Single sign on Google - google-signin

How does the Google single sign on works (OR any website's SSO)?
For example, once I login to the Gmail, it lets me see "My places" on Google Maps without signing in again? Same with Yahoo mail and Yahoo notepad.
I am guessing this checking is done locally within the browser. But any more details would be appreciated.

It is done with a cookie, that is accessible to all sub-sites on google, and it contains identification numbers. Then the sub-site queries the account server, gives the cookie, and the account server will return the user.
Actual implementation details may vary (as I am not a Google engineer), but I think you want to know how to do it, not what google does.

Related

Can I form a direct URL to a particular Google account for which Gmail is disabled?

This existing question https://webapps.stackexchange.com/questions/18959/can-i-form-a-direct-url-to-a-particular-gmail-account is close to what I need, except that I don't want to go into Gmail since email is disabled for the institutional account I am using. I want to log into some Google App - ideally Google Classroom, second choice Google Drive - but I'll take any alternative to Gmail if it shows it can be done (sorry I don't have a full list of enabled Apps for my institutional account).
This suggestion from Eivind Eklund works when Gmail is available
https://accounts.google.com/ServiceLogin?service=mail&passive=true&Email=example#domain.com&continue=https://mail.google.com/mail/u/example#domain.com/
by which I mean it gets me into my Gmail with my personal account, and with my institutional account I get "We are sorry, but you do not have access to Email. Please contact your Organisation Administrator for access."
So, is there a URL that I can pre-populate with an account to get into a service other than Gmail? I thought perhaps if I changed service=mail to service=drive, and Email= to Account= then it might work, but this produces "The requested URL was not found on this server. That’s all we know." I could be guessing all day - I can find no documentation of what the alternative parameters might be. Can it be done?
D'oh! My colleague suggested "well let's give service=classroom a try". We then went into a particular class and copied the query string, so we can now generate direct URLs for each student (who likely won't know their ID) per class
https://accounts.google.com/ServiceLogin?service=classroom&passive=true&Email=MY_INSTITUTIONAL_ID&continue=https://classroom.google.com/c/Mzk3MTAzNzk2MDVa

Google analytics Embeded api with out Oauth authorize

How can i use gapi.analytics.auth.authorize without button..
I need it for customers, to track visits on their subdomain, and I have my analytics code on page, so they can't use button to authorize, need without it, automatically.
Any example?
Your question isn't very clear it is hard to understand what you mean by Button.
I think you mean that you would like to select data from YOUR Google Analytics account and display it on YOUR website.
To do this you will need to use a service account as apposed to Oauth2 (Oauth2 would popup with a new window requesting access). When you create the service account in the Google developer console take the service account email address. Give it access at the ACCOUNT level in the Google analytics admin section. It must be the account level this will then give the service account access to read your Google analytics data.
Quota: I am not sure what you are extending to do here but remember you can only make 10000 requests per day against your Google Analytics profile. After that you are cut off there is no way to extend this number. So I advice you to save the data in the database someplace you shouldn't request the same data more then once.
Example:
I suggest that you look for an example in what ever programing language you are intending to use. Again your question doesn't state anything about what language you will be using. Hello analytics API might be a good place to start but it depends upon the language the PHP one is way out of date I wouldn't bother with it. Also you cant use a service account with JavaScript so that one is out to.
Update figured out button
Embded api I think I have finally figured out what you mean by button. gapi.analytics.auth.authorize is used in the Google analytics embedded api. Which is JavaScript which it is not possible to use with a Service account. So the final answer to your question is
Answer: You cant remove the button from the Google Analytics Embded api the only way to login with JavaScript is to use Oauth2.
Advice: switch to PHP and use a service account to request data yourself. Or give each of your customers access to your Google analytics so they can login themselves.

Is there a way to track/record via Google Analytics visitors that visit my site via Flipboard?

I've been sniffing through my Apache log files and noticed hits which mention
FlipboardProxy/1.1; +http://flipboard.com/browserproxy
Is there a way to track/ID these users via Google Analytics so that I can understand what percentage of my visits are via Flipboard?
From what i read on flipboard:
Flipboard uses a proxy service to fetch, validate, and prepare certain
elements of websites for presentation through the Flipboard
Application.
Retrieving parts of your website to present it in flipboar, they are not actually real visits to your site.
But if you still want to track those requests in analytics then you would need to write a php that sniffs user agent and trigger a gif request to analytics.
IF they're not showing up in the Browser & OS Report; they're probably not running javascript and/or block GA.
Something along those lines might end up here. Right now it shows data at a snapshot only though.
http://ripl.io/flipboard-analytics/

Google Analytics API: Include profile domain in Profile Feed

Using the Google Analytics API I would like to display the domain associated with each GA profile. Is this possible or is there another way to do it? I have been unable to find any documentation for the domain.
http://code.google.com/apis/analytics/docs/gdata/gdataReferenceAccountFeed.html#accountResponse
http://code.google.com/apis/analytics/docs/mgmt/mgmtFeedReference.html#profileFeed
I can't use profileName because depending on how the user has their GA account setup, it may just be a string and not a domain.
One thing you might do is perform a query using ga:hostnames as the dimension and either ga:visits or ga:pageviews as metrics. This will yield a chart of the host name (what is in the browser address bar) to reach that site. Sort of a hack in a way. Technically you can use a single GA Tracking code on multiple sites. So there is no "Official" domain name associated with a profile.
Unfortunately, I don't think it's possible with the current API. Furthermore, you can't explicitly depend upon the domain they enter as the only domain the profile is tracking since there is further customization that allows the user to specify if they want to track subdomains and/or top-level domains. I believe your only option is to ask the user the same information Google asks the user and help the user understand they will have to manually keep two lists in sync due to limitations of the Google API.

Does anyone use Google Analytics? How Google does it to avoid counting the owner of the website as visitor?

I don't want to be counted as visitor every time I test my page in the hosting. Does Google know i'm the owner of the site by checking if i'm logged in my Gmail account?
I don't think Google does anything like this automatically. But they do provide instructions for excluding based on IP address (or range) and apparently also now by cookie. If you use a CMS or admin interface, you could put the code they provide in an HTML file that you then include into the admin interface pages by IFRAME (to ensure that the cookie stays set for anyone who uses that interface).
One option is to install Ghostery addon your browser. Ghostery can block trackers and scripts used on webpages likes google analytics, google adword and other adwares.
You can also block or unblock the trackers for a specific site or specific tracker for a particular site.This add on is available for Firefox and chrome browsers. If you have this installed on your browser, your visit wont be counted as google analytic script wont be executed.
You can learn more about ghostery at: http://www.ghostery.com/about
There are also often application specific ways of blocking google from counting administrators. For example I've used a wordpress analytics plugin that would automatically not include the tracking code if the user was logged in as an administrator. If you are application has the concept as admin then you could write something similar that controls when the code is added.
If you visit your site frequently from connections with a dynamic IP address, eg. home broadband, then excluding IP addresses is not particularly practical. To go beyond IP exclusion, you can create an isolated page on your site that only you know about that includes a call to Analytics to label your cookie.
The Google Analytics _setVar() function lets you label yourself with an arbitrary string, eg. 'internal'. You only need to do this once per browser as long you don't clear your cookies.
Having labelled yourself as 'internal', you can create an Advanced Segment within Google Analytics to exclude visitors with that label.
Google Analytics relay on you embedding a call to their JavaScript see this link - do not confuse it with how Google does page ranking.
So the answer to your question is that your pages should be smart enough to recognize when the request comes from you and skip the call to the JavaScript.

Resources