Google Calendar API: IP address tracing and quota prices - ip

In our ERP system Qi, which has about 1200 customers, we use the Google Calendar API. In the Google developer console, I found that about a month ago the number of requests jumped from 150,000 to 700,000 per day. As a result, about 40 percent of requests now return a rateLimitExceeded error (such as this).
I have questions:
How can I find out who caused the load increase (IP address, login, etc.)?
What is Google's pricing policy about quotes? How much would it cost to increase the quota from eg 1 million to 10 million?
Thank you.
Regards, Petr.

Only for G Suite users:
You can check which users made API Requests in the Audit tool of your Google Admin Console. Go to Reports > Audit > Calendar and filter by API Kind > Calendar API.
Regarding the Quotas, you can upgrade them in your GCP Console by clicking on Upgrade Account.

Related

How to get/show the total website visits from google analytics?

We are using google analytics on our website to record the statistics. however, we need to show the total visits is it possible to show from google analytics API? TIA
Im not sure where you want to show the total visits but if its on your website you need to remember a few things about the Google Analytics api.
The first being that there is a data latency which means that it takes between 24 -48 hours for your data to complete processing. If you attempt to request say the current visits for today then the number will not be correct. You could request the number of vists for say three days ago and get back a number that is stable.
The other issue you are going to have is with quota. If you intend to load this from the API everytime a user visits your website they you will quickly run out of quota as you can only make 10k requests against a view in a single day so depending upon how many times this page is loaded this may not work for you.
An idea would be to load the data once at night and store the data in your database some place and then load from that as then you are only making a single request to the api and are unlikely to run out of quota.
Google anlaytics reporting api v4
Yes, just get ga:sessions metric defining the time interval that interests you.
Core Reporting API: https://developers.google.com/analytics/devguides/reporting/core/v3/common-queries
The Dimensions & Metrics Explorer lists: https://ga-dev-tools.appspot.com/dimensions-metrics-explorer/

Maximum connected Accounts in Analytics

we are using a iam.gserviceaccount.com Email adresss to connect our tool with the Google Analytics accounts from our clients.
We have reached the maximum connected accounts, but an upgrade is not possible because we can't response to the emails sent by analytics support.
Is there another way to upgrade it? Or is there another possibility to connect our tool with the analytics API?
We already tried to upgrade the account with the analytics support, but it is not working because of the emailadress.
For normal Google analytics accounts there is a limit to 100 accounts that you can have access to. If you upgraded to a premium account if i remember correctly that number jumps to 250.
You are currently using a service account and granting it access to a number of Google analytics accounts. The service account is going to be bound by the normal user limit of 100 and your not going to be able to increase that.
The problem is that you are using service accounts in correctly. Your not supposed to be giving the service account out to your customers and asking them to add it as a user on their Google analytics account. Service accounts are intended to be used by developers and companies that have access to data and want to share that data with others.
You should be using Oauth2 to gain access to the users data and saving the refresh token in your application which will enable you to request data for the user when ever needed.
By using a service account you are going to be hit with a lot of quota limits because they are shared by the user a user can only make so many requests so fast per day. By using Oauth2 you would be using different users and would not have as many issues with the user based quotas.

Understanding the Google Analytics real-time API 50,000 call limit per project

I am trying to build an application using Google Analytics real-time API. So, I see this quota limit at 50,000/project. I am aware of 10,000/Google Analytics View limit. So, based on these values, my application can handle only 5 users/day.
Am I doing something wrong? Is there any workaround for this?
Its 50,000 API calls per day to query your data, not for collecting data.
What is this 10,000 Google Analytics View limit you refer to? It is not listed on the GA quotas and limits page
There is a 10million hits per month limit per web property, if you go over that then they ask you pay for GA360

Google Analytics Management API write requests quota limit

What is the Google Analytics Management Write API quota limit? Is it 50 requests per day or 500, because the documentation states that it is 50 requests per day but when I'm filling the quota augmentation demand form, it says that it's 500 requests.
50 requests seem to be too low and it is the case for my project.
On the other hand, where can I check my daily usage of write requests? The console usage tab doesn't show it.
EDIT: Here is a screenshot of the Google Form to demand an increase in quota limits
Google form quota limits
Google Management Write API is at 500 requests per day.
The quota limits depend a lot upon which methods you are using. Please consult the Quota Limits documentation.
The following quotas apply to Management API, Core Reporting API v3, MCF Reporting API, Metadata API, User Deletion API, and Real Time Reporting API:
50,000 requests per project per day, which can be increased.
10 queries per second (QPS) per IP address.
In the API Console, there is a similar quota referred to as Requests per 100 seconds per user. By default, it is set to 100 requests per 100 seconds per user and can be adjusted to a maximum value of 1,000. But the number of requests to the API is restricted to a maximum of 10 requests per second per user.
If your application makes all API requests from a single IP address (i.e., on behalf of your users), use the userIP or quotaUser parameter with each request to get full QPS quota for each user. See the standard query parameters summary for details.
Write APIs
These quotas apply to the write (insert, update, patch, and delete) requests:
50 write requests per project per day, which can be increased
1.5 queries per second (QPS) per Account ID
actually quota
response from Google
the default quota is 50.
There used to be a whitelist so it was effectively 0 until you got whitelisted and then it was 500 (once whitelisted). We removed the whitelist and reduced it to 50 so that people can use the API without having to wait to be whitelsited. If they need more they can request additional quota.
I wonder exactly the same. I wish to get my write quota increased to 500.
From my experience, the usage of your write requests is under "Queries per day". This morning I only made 50 write requests and it now shows 50/50 000 queries for today. Doesn't really make sense...
This post won't clear up the write quota but it will show a source of the confusion - hopefully Google will clarify this
This api-quota-faqs page clarifies a number of ambiguities regarding quotas and batching (e.g. batching doesn't help with the Management API write quota).
But the 50 vs 500 ambiguity is currently still perpetuated: The current version of that page shows "Last updated April 13, 2018":
What is the maximum quota increase limit for Management API write requests?
The maximum daily quota per project for Management API write requests is 500. We normally don't grant more than 1,000 to 2,000 write requests per project per day. In some cases, we grant higher limits temporarily. Please include your justification in the quota increase request form.
That page is required reading before submitting the form to request an increase but that shows 50 - see image
Our usage metrics shows 71 successful Management API write requests for the day but we still got write quota errors - so neither 50 nor 500 is validated.
Regarding finding the usage:
(I don't see our Management API write quota listed with the other quotas)
The traffic and error metrics are found at APIs & Services > Dashboard.
Clicking on the Analytics API will take you to detailed metrics with listings by method (e.g. insert, update, etc)
URL is:
https://console.developers.google.com/apis/api/analytics.googleapis.com/metrics?project=project-id-9731708857265513301 (replace with your project id)

Increasing Google Analytics API Quota

Our organization is approaching the hard limits for the Google Analytics API (10000 profile access/day). Google clearly indicates that they will not increase this.
Analytics API quota request form
Quotas that CANNOT be increased:
-- Per view (profile) limit of 10,000 requests/day [403 Error with Message about Profile limit: dailyLimitExceeded]
There is a Google Analytics Premium for 150 000USD a year but that is much more that we can afford for such a service.
Is there no middle ground for a paid increase to the Google Analytics API quotas?
There is no way to increase the 10,000 request per profile / view limit. Even if you have a premium Google analytics account that wont change.
What you do get with a Premium analytics account is the option to use BigQuery with Google Analytics making this problem go away.
Option make a second profile / view for the web property you get another 10k that way.

Resources