Let's assume we have a goal to setup offline events tracking using measurement protocol, the only limitations from our side is that we need to post the events feed once daily and have a GA setup with correct standart reports from GA UI.
GA limits:
Session timeout limit is 4 hours;
Max time delta between when the hit being reported occurred and the time the hit was sent - the qt parameter, is also limited to 4 hours;
Test case:
"0". Session timeout limit is set to the max 4 hours.
User visits site at 9 a.m first session is created.
It takes him 10 minutes to get the info needed for making a call.
User makes a call and an phone order at 9:10 a.m. Unique, non personally identifiable code is passed with the call to CRM and saved in GA dimension and uid.
At 6 p.m call-report CRM generates the call-report and passes it to GA using measurement protocol event upload HTTP requests.
At 6 p.m call-report CRM generates the transaction-report and passes the phone order value & number to GA using measurement protocol transaction requests.
Questions:
1) Does the qt parameter in request described on the 5'th step of test case needs to be equal to:
1.1) Possible maximum value - 4 hours (because otherwise it may be not processed by this rule "Values greater than four hours may lead to hits not being processed.")
1.2) Actual value - 8 hours & 50 minutes.
2) Does 1.1 result in a first session timeout?
3) Does 1.1 result in a second session being created, which:
start-time is equal to 4 p.m & 50 minutes;
end time is equal to 4 p.m & 50 minutes;
user-agent by-default is equal to the value which has been used in measurement protocol HTTP request;
by-default is not closed, so if a second user visit is on 4 p.m this visit's hits will be sent to this session;
4) Does this second session affect the value of standart report's parameters, such as:
average session length;
average bounce rate & exit rate;
average pages per session;
5) Does the second session affect the flow reports or any other Google reports making in incorrect?
It should be equal to possible max value, or 0, if it's more then 4 hours since the date, and you should write the actual date as a custom field and process the data later.
Yes, a new session will be created, if the last session expired.
Somewhat.
Yes.
Flow reports are based on users not sessions.
Related
I'm kind of new to google analytics. I have a site where every time a logged user sends a request to the server I'm sending the event to google analytics.
This event contains this fields: {category: 'api_request', action: request url, label: the logged user id'}.
I am wondering if it is possible to see all sent requests for a specific route for a specific user. I will like to get the specific date-time of each request for this route.
I tried to do this in google analytics and found that I can group by action & date, but it doesn't contain the exact time (make sense). Can I achieve this behavior with google analytics or ga-dev-tools?
Be aware of high cardinality
https://support.google.com/analytics/answer/1009671?hl=en
If you start to collect unique data timestamp with every hit, you can soon reach cardinality limit, taht is 50.000 unique dimension values perday. Once you reach this limit, all other collected values will be treated as other.
Consider that day have 86400 seconds.
Date.now()
Date now return time in miliseconds. So every hit will probably have different timestamp and you will reach limit soon.
So if you want to do this, use at least seconds.
Date.now() / 1000;
You have to configure (and send on each event) a custom dimension hit level that contains the current timestamp (i.e. Date.now()).
For zaza.rocks I wonder if a unique visitor that completes 2 goals (for instance "create bag") in one session is counted as 2 goals?
Note: each time a visitor creates a new bag a new url is provided.
I know that under normal circumstances one goal is tracked per session. But this got me thinking: "One session can have one goal completion for each configured goal. So, the total can be up to 20 per session."
20 is the maximum number of goals that you can configure in a view.
Each goal can only be activated once per session.
So if 20 goals are configured in a view and a user in a session activates all goals (one or more times), 20 goals will be counted for that session (one for each type).
I have 3 custom metrics that track the elapsed time of an HTTP request to an external service, so I can see how performant they are. I am able to setup 3 alerts to tell me when they are taking too long, but I would also like to setup alerts to tell me when the request rate is over or under a certain threshold, for each of the 3 calls.
I can see there is a general Request Rate alert, but this applies to the entire app insights resource - which I share with the rest of my company. So if I set up an alert where the request rate >= 100 every 5 seconds, this will be counting not only my 3 requests but also a whole bunch of other requests I don't care about.
I want to end up with something like this, repeated for request B & C:
Does request A take longer than 3 seconds (avg over the last 5 mins)? - done
Are there more than 100 requests for request A (avg over the last 5 mins)?
Are there fewer than 100 requests for request A (avg over the last 24 hours)?
Is this possible? Should I be looking at some other way of dealing with the requests/metrics?
Yes, it is possible. One way to do this is to use the "Custom Log Search" as a signal to an alert, like here:
If you want to test your queries you can do so in Log Analytics (Application Insights -> Search -> Analytics).
We're implementing Google Analytics in retail consumer kiosk software. There is no Javascript or SDKs or web pages involved - we craft a URL per Measurement Protocol and post it. We find that sometimes hits seem to just stop getting counted. If we watch the Real-Time section on the GA web site we can see that our hits continue to get posted, but over in the Behavior / Screens section the number of screen views for this device for today stops incrementing.
It's not just a "sometimes you have to wait 24 hours" thing, because Tuesday and Wednesday of last week still show zero today. If it's a rate limit, I can't see what - we're nowhere near 200k hits per day (per user, but from our point of view each kiosk is a user - we don't have any means to identify individual users); we shouldn't be hitting 500 hits per session because we send a session start (ec=Session&sc=Start) each time the user does something on the main menu and a session end (ec=Session&sc=End) each time the workflow finishes, which shouldn't ever be more than 20 screens - the default 'idle timeout' definition of a session wouldn't work well for us since a user can legitimately be working on a single screen for 10 minutes or more editing a picture whereas also a user can finish and leave and the next user in line start using the kiosk within just a few seconds; we shouldn't be sending events 'too fast' because it takes a couple seconds for a human to read the screen and reach out and touch a button.
What we observe is that some days it counts up to 340-360 and stops and some days it stays at 0 permanently. Any idea what's happening and how to fix it?
11/24: Today it went up to 352 and then stopped. This was about one hour of activity. All of this has been done with "Highest precision" selected.
12/1: Still same, counts for about one hour, to 347 screen views today, then stops incrementing.
When I look at Audience/Overview it says "Sessions 1". There should be dozens of sessions, split up by when we send (ec=Session&sc=Start). I think it must not be recognizing that as a session, it must be using the session timeout (idle), and staying all within a single session, and therefore limiting to 500 hits (we've got some events to go along with the screen views). And this is just wrong. Session should end when we say it does.
12/1: One correction, we actually do send sc=start and sc=end, with the values lower-case, as specified by Google.
My coworker did some experimenting and found that sc=start is ignored on t=event hits. It is recognized on t=pageview hits. I changed my reporting a bit to generate a fake pageview when a session starts, just so I could send the sc=start, and now the counts are accurate.
I am trying to stress test my google analytics system and I have sent around 100,000 request to the GA at the rate of about 3000/s . I have received 200 as the status code for successful ping to GA. All the request sent are exactly similar.
But when I see the real time dashboard the numbers are wrong and only shows about 1/3 the total requests sent. Has anybody observed similar behavior with GA?
Do You know that a standart (free) version of GA has many restrictions? For example it has limited number of hits per second collect by it. It is normal behaviour to limit collected data if You make 3000 hits per second.
As per documentation:
ga.js:
Each ga.js tracker object starts with 10 hits that are replenished at
a rate of 1 hit per second. Applies only to event type hits.
analytics.js:
Each analytics.js tracker object starts with 20 hits that are
replenished at a rate of 2 hit per second. Applies to All hits except
for ecommerce (item or transaction).
Android SDK
For each tracker instance on a device, each app instance starts with
60 hits that are replenished at a rate of 1 hit every 2 seconds.
Applies to All hits except for ecommerce (item or transaction).
iOS SDK
Each property starts with 60 hits that are replenished at a rate of 1
hit every 2 seconds. Applies to All hits except for ecommerce (item or
transaction).