I am trying to figure out just how Google Analytics logs the actual time of an event such as a visit or a click. Does it use the time being passed by the HTTP request, the date in the HTTP Header, or the date it actually receives the request ?
The reason why I am asking is because I am developing an app where there MAY be some times where the internet connection is lost. So, I am considering developing a buffered proxy to hold these requests until the connection is back up. If the data/time is based on the header or the time of the request, then it will not be a viable solution for me.
If anyone knows, it would be greatly appreciated.
The Google Analytics server uses the actual time of the event. This means that any event notification buffering that your app performs will be timeshifted in your reports.
Only you can decide if that's OK for your reporting requirements: which is the lesser evil, to drop events, or misreport the times that some events occur?
Related
We are using the Google Calendar API to keep a sync between our app and events in our users' google calendar.
We have started regularly getting rate limiting errors (403).
However our usage according the APIs and Services page of the google cloud console is well below the stated limits (10,000 queries per minute and 600 per user per minute). We are also using the batch API to send our requests so cannot implement exponential backoff
Anyone got any advice on avoiding these rate limiting errors?
Rate limiting errors with google are basically flood protection you are going to fast. Dont hold to much stock in what the status shows on the Google developer console the numbers in those graphs are guesstimates at best and they are not Realtime.
The main cause for rate limit is that when you send a request there is no way of know which server your request is going to be run on. There is also no way of knowing what other requests are being run on the same server. So your request may run faster or slower than you would expect sometimes which makes it hard to track down exactly what 10,000 queries per minute and 600 per user per minute actually is.
10000 requests run on an overloaded server may run in 2 minutes while on a server that is not being overloaded it could be run in 30 seconds meaning the next request you send will blow out the quota.
As there is really no way of avoiding it you you should just ensure that your application is capable of responding to it by sending the request again. I wrote an article a number of years ago about how i would track my requests locally in my application and then ensured that it kept things at the right speed flood buster
Really as long as your application responds by sending the request again you should be ok.
I want to implement Whatsapp
to send information from an external application. The idea is to use this
external application to send information throughout Whatsapp.
If you can help me about the terms and
conditions and if this query is possible to develop.
There is a way through which you can send WhatsApp message from your self created application. Use this link Chat API.
But it only provides 3 days trail period and after that you have to purchase it.
The process in that is, you have to register with your google account, then scan the QR code provided(which changes after every 45 seconds). and you are set to go, they will provide you the API for : PHP, Node.JS, Jquery, CURL.
One thing more you always have to keep your phone connected with the internet everytime.
Also I found a drawback in that, i.e. they also provide API to read messages, but it is too slow, as in my condition I can see my messages of yesterday but not of today.
I am looking to send hits to our Google Analytics account from our server-side REST application. It seems this is possible by constructing a POST request based on the format at https://ga-dev-tools.appspot.com/hit-builder/
However, multiple attempts at sending test hits have failed. I have tried sending tests from within Hit Builder as well as via cURL. I've confirmed our TID (Tracking ID) is correct and the URL and parameters validate properly in Hit Builder.
Any tips appreciated!
Don't know if this information helps concerning the Google Analytics Measurement Protocol (validating hits)
https://developers.google.com/analytics/devguides/collection/protocol/v1/validating-hits
I remain a little confused by this bit:
"Important: hits sent to the Measurement Protocol Validation Server will not show up in reports. They are for debugging only."
I guess besides the Reports, you can still see the Events getting fired off in real-time, they don't get reported/recorded, that's all.
Just some example usage for a Google Analytics account that I set up, (for a mobile app). I first constructed an example Event-type hit. Checked that it liked it. And then fired it off to Google Analytics:
And then over in the Google Analytics account, navigate to Real-time > Events and take a look:
This is probably quite late for your purpose given that the OP was made in 2016, but I'm posting so that it could help anyone else with the same question. Here's one likely scenario (happened to me):
You are sending hits to GA from a location that you set IP filtering for under GA property >> View Settings. In that case GA will not show these hits. If you are indeed firing the hits from a blocked IP, then for testing purposes, either try using a VPN, or else create a new Test-View with no IP filter and check if the event shows up in that GA view.
A little late but I encountered with this issue and I had two elements blocking the event from the Master view. Events registered good on All data view so I had to check filter by flter on my Master view. I had Carlos SEO's filters implemented and turns out the ISP Provider Bots 2 filter leaves out your event hits.
The second thing blocking my event was the "Exclude all hits from known bots and spiders" checkbox on the view settings; I had it checked.
Hope this helps anyone who has the same issue :)
I am using Cronofy to integrate my application (only locally tested yet) with multiple calendar platforms.
I am having trouble getting it to update or delete events which are created natively (google or outlook) and I cannot understand why. The documentation (https://www.cronofy.com/developers/api/) is not sufficing to understand it and there's not much more out there besides that.
When I send a request for deletion of a native event I do get a 202 HTTP response back but the event remains in my google/outlook calendar and if I do the same for my own event it deletes there smoothly with the same 202.
How can I make it work? I've read about auth flow and that 202 means it is processing but this processingtime seems to be taking too long for it to be that (~2days)
As standard, we sandbox calendar access and don't allow developers to edit existing events in end-users calendars.
There is a process you can go through to request extended permissions on one or more of a user's calendars if you need this functionality. Let me know via the support#cronofy.com if you would like access to this.
We differentiate between 'managed' and 'unmanaged' events in our API to help streamline the kinds of operations different use cases require.
Managed events are events that are created by your application. When they are created we require an event_id which is your id for the event in your application. You have complete control over events with an event_id. In order to delete a managed event you would pass the event_id as the identifying parameter https://www.cronofy.com/developers/api/#delete-event
Unmanaged events are events created by the user in their calendar. These have an event_uid which is used to identify the event. If you have sufficient permission to delete unmanaged events then you would pass this event_uid as the identifying parameter.
The reason we're returning a 202 is that our API is asynchronous. Every API request is a journal operation which is executed by a worker. We don't inline calls to downstream APIs. Instead we protect your application performance from having to deal with whether a calendar server is available and responsive to meet your request.
I hope this helps explain what you're seeing. Any questions, let me know either hear or at support#cronofy.com.
Adam
I did comprehensive Google research but I cannot find any good solution, so any help (or just showing direction of next research) would by REALLY appreciated!
What I need is simple in idea, but looks like hard to implement:
I have data (say just picture) I want to show to all (even anonymous) users of website in the very same time. This data should change regularly (say once in 5 minutes), so the browsers of all users must refresh in given time.
The woflow is simple:
User will open page with countdown (which will show of course different time for each user depends of when the user has had connected).
At the end of countdown shall all browsers of connected users refresh to see new content.
The refresh should be ideally invoked by server to prevent prematured refresh when data doesn't changed yet.
I was thinking of "refresh" meta tag, but it is problematic for SEO and it rely on user computer's clock.
It can be done by javascript, but in that moment I rely on user computer's clock.
I have hearded it is possible "push" data from server to browser using e.g. Perl, it is correct (is there somewhere some example)?
And in which scripting language would you write script which would "tick". I cannot see way in PHP I am familiar with (use cron to execute counting script every minute looks really ugly)...
Thank you!
Michal
It's not possible to push data from a web server to a web brower, given the request-response architecture of HTTP. It is, however, possible to poll the webserver using JavaScript and window.setInterval(); combined with AJAX.
If not using local system time is an issue, why not respond to periodic AJAX requests with the number of microseconds until the next reload of data should commence? I would suggest you use AJAX for all of this instead of refreshing the browser with META REFRESH, or window.location.
The server-side code could be anything really, you simply need a page that will return the number of microseconds until the next schedule refresh (And perhaps an error if no refresh is scheduled yet, telling the client JavaScript to poll again in a few seconds).