I have made a simple script that retrieves a top 25 visited urls from our Google analytics account, and the data is outputted as I want it.
However I would like the output to be displayed eventhough the visitor hasn't logged in using a google account. Googling on the subject hasn't given me any pointers how to come about that task?
do not configure login in your app.yaml
Related
I created an API using Python + FastAPI and deployed it to Google App Engine and I would like to measure the cost for each request made.
I saw there is a header "x-appengine-estimated-cpm-us-dollars" that show up when logged in with the owner account on GAE, but I didn't see it when accessed the API using the browser "https://example.uc.r.appspot.com/api"
Any idea how to can I see this header or a way to get an estimated cost for each request made?
Note: the deployed script is an API, not a website with auth like the one mentioned here (Usage of X-AppEngine-Estimated-CPM-US-Dollars in AppEngine)
According to the documentation:
If you access dynamic pages on your site while signed in using an administrator account, App Engine includes per-request statistics in the response headers
And then shows the description for this particular header, therefore, this is not something that is available for APIs hosted in AppEngine.
You could alternatively use the Cloud Billing API to gather some information, although not exactly the same.
I'm quite new to Google App Engine and it's cloud Datastore which is used for storing the backend's data by default. As far as I realized you can only view it's content within the developer console and you can create or edit entities there.
But is there any external tool from which you can connect to your datastore to create reports or administer the data? What is your experience?
In fact yes it's true you can only see data's from the admin console.
If you wish to see your data's in Google Drive Table and make a report you can, but for that you need to create a connector to your sheet (I already made one). It's exactly the same if you need update or import data's to your datastore.
I use this Technic to upload or refresh products on my e-shop GAE app.
In general if I need to see a report, I design a specific web page for that and I protect theme via a login / password. To see a well formatted report you can use jquery library or use Google Charts
I'm running an app on GAE that does a number of things. One of those things is receiving an email with attachment and responding with a mail with a CSV attached to it. The category of people that use this option, never visit the site.
Would it be possible to add something to my mailhandler so that every mail received is processed as a page visit in Google Analytics?
I'm using Jinja2 as framework.
You can use Google Analytics for Mobile Websites. It allows for server-side invocation.
Basically it just produces an image url that triggers GA when loaded in mobile site. In your case you should invoke this url with your own parameters. Here is an example Url:
http://www.google-analytics.com/__utm.gif?utmwv=4&utmn=769876874&utmhn=example.com&utmcs=ISO-8859-1&utmsr=1280x1024&utmsc=32-bit&utmul=en-us&utmje=1&utmfl=9.0%20%20r115&utmcn=1&utmdt=GATC012%20setting%20variables&utmhid=2059107202&utmr=0&utmp=/auto/GATC012.html?utm_source=www.gatc012.org&utm_campaign=campaign+gatc012&utm_term=keywords+gatc012&utm_content=content+gatc012&utm_medium=medium+gatc012&utmac=UA-30138-1&utmcc=__utma%3D97315849.1774621898.1207701397.1207701397.1207701397.1%3B...
See here for a full list of parameters.
I recently created a new google account and registered a new domain for google app engine that i want to use now with a java gae project i wrote.
When i try to access
https://appengine.google.com/
or
https://appengine.google.com/a/my-domain.com
i always get redirected to a page
"Welcome to Google App Engine Before getting started, you want to
learn more about developing and deploying applications."..... Create
Application
When i push this button, and enter the phone number i used to create the account/domain this is refused with:
The phone number has been sent too many messages or has already been
used to confirm an account.
I am not able to deploy my GAE application as i simply dont know the Application ID. I can not create a new one and i can not find out if i already created one as there is no way to access the dashboard.
Any Hint?
Please help
You already used that number to validate a different Google account, you need to create the application with that account.
More information at the SMS Verification for App Creation FAQ
Google recommends to fill out the following form in this event to verify the account manually:
https://appengine.google.com/waitlist/sms_issues
I have a GAE application with a database of users.
When one of the user tries to download, say, file myapplication.appspot.com/somefile.jpg, I would:
check on the GAE database whether he is allowed to
if he is allowed, redirect him to a cloud storage bucket of mine from where he can download somefile.jpg
if he is not allowed, return him a 404 error code, and do some magic so that directly trying to download somefile.jpg from the cloud storage bucket does not complete.
Now what’s unclear to me is how to control access to somefile.jpg. How can I restrict the download to this scope of users?
PS: using something else than Google Storage is not an option (for those of you guys who thought about blobstore).
You don't need to restrict access on a per user basic you can restrict access on a per application (Google App Engine App) basis.
Every application has a service account, what you can do is set an ACL on the bucket to allow access to the application service account.
Now all you need to write an handler that would access Google Storage and return the data to the user.
As Shay noted, every App Engine application automatically has associated with it an internal account, called the “service account”. Normally, the service account name follows the pattern “your-app-id#appspot.gserviceaccount.com”, however, you can confirm the exact name by visiting the App Engine Administration Console, then clicking on your app name, followed by the “Application Settings” link, at which point you should see your service account name.
Once you find your service account name, add it to the “Team” subpage on the APIs console with “Can edit” permissions. This is even easier than updating the bucket ACL because you don't have to change any ACLs, however, bear in mind this applies to all buckets in your project. If you'd like to restrict your app to only have access to a subset of the buckets owned by your project then you'll want to update the per-bucket ACL(s), as Shay proposed.