Is there a way to collect Google IDs which access a Google Site? - google-sheets

I have created a Google Site which links to various Google Classrooms. I would like to know who is using the site.
Is there a way of recording the Google ID in a Google Sheet, for when someone accesses the site?
Any help or even a point in the right direction would be great.
Thanks

Ok, since you are using Google Sites, you can create a user start page by following these steps, this page will ask the users to authenticate with their emails, and will allow only users from the organizational unit for which the site is allowed.
After that step, you can use Google Analytics with your Site to track the behavior of users in your Site.
I suggest starting with a quickstart of Google Analytics to get the hang of it.
And soon enough you will have it set up to suit your needs.

Related

Is it possible to use Django Allauth with Google Ads API?

I've seen that Google is one of the available providers (https://django-allauth.readthedocs.io/en/latest/providers.html#google)
But the link there is broken and I'm not sure if Django Allauth is only for "simple" Google authentication (people creating an account on a website with their Gmail/Google account) or if it works also for more "complex" services like Google Ads API.
I've checked the "official link" that Google Ads mentions (https://developers.google.com/identity/protocols/oauth2/web-server#python), but I'm a Python newbie and I don't know enough yet to judge this.
If Allauth is not a good option for accessing the Google Ads API (via Oauth2), can you please tell me other Django packages that could be good for this?
I've seen many other Oauth packages for Django (https://djangopackages.org/grids/g/oauth/), but even after reading their descriptions, I'm still not sure if they are designed for what I need.
Thanks!

POSTing to Google Sheets - Access Token

At the moment I have created two versions of my app - for iOS and Android - Where I use the OAuth workaround of posting to a Google Form to indirectly add to a Google Sheet.
However, I am now planning to remake the app in Google's Flutter (using Dart of course), and would prefer to use the proper direct way of POSTing to the sheet (it will simplify the situation for my client), but am having trouble trying to figure out how to do it.
I've found a simple explanation of how to to do the POSTing, but it requires an Access Token - what appears to just be a string.
After searching for an explanation of this, all I've found is explanations of how to create an OAuth token for the user using the app, but I just want to be able to post from within the app - totally separate from the user.
I guess I want a 'static' token that will just allow me to post to my sheet from my app indefinitely - is this possible, and can someone please explain it to me?
It sounds like you want to use what Google calls a service account for access to a sheet that belongs to your app rather than user's account for access to a sheet that belongs to a user.
https://developers.google.com/identity/protocols/OAuth2ServiceAccount

How to distinguish between a Google Doc and Spreadsheet with the URL?

Is it possible to tell if a URL links to Google Sheets, Google Docs, or another Google app from the sharable link?
The app I am working on allows users to share links, but Safari on iOS devices doesn't seem to handle these links very well. To help ease our users pain, we would like to directly open the link in Sheets, Docs, or whatever other Google app works best, should it already be installed. I have been able to accomplish this by editing the link provided, replacing:
https://
with:
googledocs://
or:
googlesheets://
However, based on the sharable links, it's hard to tell if the link is a Google Doc, Google Sheet, or something else all together. I originally thought Google Sheets used sheets.google.com, but after testing out this change, I realized both Sheets and Docs use docs.google.com for their sharable links. If the wrong app is opened, Google Sheets or Docs will throw an error saying it cannot open the file.
Is there a simple way to make this distinction and ensure the appropriate Google app opens for any given sharable link?
Definitely not from the shareable link. The shareable link is basically just a redirect to the actual document. It's a hash that's generated independently from the original document that is intentionally obfuscated to prevent malicious parties from guessing them.
The only way to know what's on the other side of the link is to visit it or use the Google Drive API to query the document for info.

Google calendar able to be read by everyone

I'd like to be able to have admin users sign up in our system and have their Google calendar events be readable by everyone on the site. I'd like the customers to be able to see free slots on their schedule. Is this possible and how would I implement this in a Rails app?
Any suggestions? (I've read the OAuth and Calendar APIs, just looking for how to start setting up my app).

Google Analytics API displaying a single account

I've been working with the Google Analytics API to create a page showing some specific statistics. Right now everything is working, except that after the user goes through OAuth, it is displaying statistics from their Google Account.
Instead, I always want it to display statistics from a single Google Account that I own/operate, and everyone else is just viewing the data from that account.
I haven't seen a way in the GA documentation to accomplish this. I would assume the user wouldn't have to log in, because I'm just showing them my account, but it's not the end of the world if they have to.
If you're looking to create a place where users do not have to go through OAuth, you should really look at using Google's superProxy to publicly display data.

Resources