Google Calendar API limited usage issue - google-calendar-api

We are doing an integration with Google Calendar Api, trying to publish events in a calendar, and then add them to the invited users (attendees) in their primary calendars. After doing a couple of tests and publications we skip the error message:
Calendar usage limits exceeded. [403]
We have read the documentation and the limits of petitions, but we are not passing at any time of that limit, and we skip the same error. We have seen in forums and in the same documentation of the API, that the reasons can be diverse, like the publication of more than 25 calendars, overcome the 10,000 events, etc.
In our case, we do not overcome any of those limitations. To get an idea, we did not surpass the 200 events in a couple of days. And since we started testing, events don't exceed 500. That is why we are trying to contact you as the last solution, because we do not know where the problem is.
Is there are any daily or sendings attendees exact limits ? Because we need to launch and update many of them, and don't know how to do it. How can we publish and share this events without having the limitation failure? In our Google Console we say that the quota still remain 1.000.000 queries per day.
To make myself understood, my procedure is: I have a general Calendar with a Json Keys, and I publish all my events in it. Then, I trying to add attendees and publish(share) part of my events with them. But I have the same error for days. I know that Google Calendar limits the number of invitations a user can send to external guests 100-300 guests exactly. But I do not know if is a limit per hours, days, or account? How we can do to publish many events with attendees without limits? Is there a solution for that?

As can be read in this post, besides what is written in the documentation itself, this is a hard limitation from Google to stop spammers.
Currently there is no real solution and it's up to Google. There are rumors that Google is trying to tackle this issue but nothing has changed in the mean time.
Basically, your only option is either to wait and see what Google does with this or abandon their solution and find an alternative.

Related

Is there any way to know the waitTime if Google calendar usageLimit or rateLimit is reached

I am working on developing integration with Google Calendar using Rest API. I got to know Google applies both rateLimit and usageLimit on API calls - 403_calendar_usage_limits_exceeded
In case I breach the limits, I want to wait for a defined period of time before I retry the request again. Is there any way to know if there is something like Retry-After header returned by Google.
I checked documentation but not able to find anything related - errors
You can see your quota in google developer console under libary search for google calendar and then click the manage button. Under the quota tab you will see something like this.
There are two types of quota user based quota denoted by the "per user" and project based quotas.
Each user running my application can make a max of 600 requests per minute. if they make to many then i will get a quota exception.
My application can make a max of 10000 request per minute in total. if it makes more then that then again i will get a quota exception.
You may want to read though Manage quotas this explains a lot about quota usage and the google calendar api.
For the most part if you just implement exponential backoff you should be able to avoid to many of these errors.
try request if fails
wait 10 seconds
try again if fails
wait 20 seconds
try again if fails
wait 30 seconds
try again
.......

How can I fetch the number of pageviews per page on my site in the last 30 minutes with google analytics?

I would like to add a "what other people are doing" section to my react website, which shows the currently most interesting sections of my website using google analytics. This means I would need fetch the most popular pages every 30 minutes from google analytics from within my pages backend, presumably using the realtime api, because I know that the reporting of the reporting API can be up to 24 hours out of date.
But unfortunately, the realtime API seams to only be able to track users that are using the page currently, and there doesn't seam to be a way to distinguish which actual page there on.
Basically what I need is a way to figure out how many individual people (not just people refreshing over and over again) have visited a certain section of my page in the last 30 minutes. Google analytics seams to be the way to go but I'm open to any other solution, as long as it can be used from within the aws cloud.
What you need to remember is that the Google Analytics website also uses the Google Analytics API. If something you want to see can be done on the website for the most part you can also do it with the api, with the exception of a few of the calculated metrics which can be a bit tricky to duplicate with the API.
The reporting of the Google analytics Reporting API takes between 24 - 48 hours to process your data until that time your data will not be completed processing so the numbers will not be correct.
The google analytics real-time api would be an option but the data is limited into how long it stays around as well is what dimensions and metrics you can actually view as they are only giving you access to what they are sure has completed processing.
An issue with both of these solutions would be the quota, every view on google analytics is only allowed to make 10k requests per day. You will need to ensure that you stay within this so if you are only requesting data every thirty minutes around the clock you should be able to keep this to around 48 calls but its wroth noteing.
IMO Google analytics is not suited for this task you should keep a running count on your own website store it in the database and use that.

How to store firebase analytics data offline for more than 72 hours?

I am using Firebase for analytics and I have enabled firebase persistent storage which helps to send the analytics events to firebase when the device comes online but the limitation is it only sends 72 hours data to Firebase analytics.
I want firebase to get at least offline analytics data of the last 10 days.
Can I achieve this by storing this analytics event in core data when the device is offline and send this event to firebase when the device is connected to the internet?
Or is there any alternative way to achieve this?
I only want to send the event name and timestamp of the event.
You can probably do something to store the events locally, but it'll be finicky and error prone.
When storing the events yourself and then submitting them when the device is online, I see many potential problems. Off the top of my head:
There is no API to track the lifecycle of Firebase's built-in purging of analytics event. So you have a decent chance of events being logged twice.
You can't backdate the events, so any events you fire upon reconnecting are going to show up as having happened then.
You're likely going to miss events that Firebase logs automatically. You could probably compensate, but at that point you're almost building your own Analytics solution.
Honestly that is some of the potential problems, and you're likely to encounter many more. I'd seriously consider if the effort is really worth it, or if you'd be better off picking another solution.
Some solutions that come to mind:
Log your own events directly to BigQuery. Then merge then with Firebase's exported Analytics events, and deduplicate the results.
Pick an analytics provider whose API meets your requirements directly.

How to know if Google Analytics Property is going to exceed 10M Hit Limit? Other than checking on Google Analytics? Any API's given by Google?

I am using free version of GoogleTagManager and GoogleAnalytics for getting analytics my website. The free version of Google Analytics allows for up to 10 million hits per month, per property as per TOS.
We can check under settings section in GoogleAnalytics account as to what is the hit count in last day, last 7 days, and last month.
But, since that requires manual intervention that someone has to login to check; Is there a way to get to know what my current limit is for the month? So that if I am closer to breaching the limit we can disable GTM tracing.
Is it different for GTM?
There is no hit limit for GTM.
In Google Analytics, you could use the Reporting API to get monthly statistics, and then use the GTM API to pause the GA tags (which makes this somewhat on-topic).
The relevant metric would be ga:hit. This is not exact (it reports the hit volume of the view rather than the property) but should be "good enough" (as long as your view is not too heavily filtered; since a proper setup includes an unfiltered view in any case this would be a good candidate to get the number).
However you do not need to bother. If you exceed the limits then Google will warn you via email. You then have a few weeks to respond, and introduce sampling or other measures to bring down your hit count. Only if you ignore their warning they will terminate your account.

Google Analytics quota dayshift

I'm working on a solution where we need to request the Google Analytics API quite a lot. Now the issue is I want to allocate my requests because of the day quota limits. But right now it's quite unclear when Google makes it a new day and I have another 50.000 requests to make. From the developer console report I can get a detailed picture of the daily requests used.
Does anyone knows at what time of day and in which timezone the requests are reset?
You can request that Google Extend your 50,000 quota. Note: I am not sure if they charge for this or not. You can only do this though the old Apis console for your app. I have been unable to find this feature in the new cloud developers console. (I have sent in a feature request on it)
On the right you will find a link to Request more. But you need to make sure that you don't have to many errors returning from the API this will effect weather or not they will except your request to extend.
Note: Daily quotas refresh at midnight PST.

Resources