When I access the page of certain communities of Stackoverflow, it often occurs that for about a minute my computer gets a very high loading and I can't even scroll the page with the mouse. Recently I read at the bottom of the screen that it was waiting for google.analytics.com in that time period.
Is this a normal phenomenon to be expected or could I do something to avoid
that inconvenience?
You can opt out of being tracked by Google Analytics or download a number of add-ons that block network requests for the script, but I highly doubt that would solve your problem.
Google Analytics is loaded asynchronously, so it doesn't block other scripts or affect the performance of anything else on the page while it's being downloaded.
There may be times where the connection is slow or for whatever reason it takes a while for your browser to download the script from google-analytics.com, but if you page is responding slowly and you happen to see that it's waiting for google-analytics.com at the bottom, those two things are likely not related.
What's far more likely is that whatever is causing the request for the Google Analytics script to be slow is also causing the rest of the page to be slow. In other words Google Analytics is not the root of your problem, it's another symptom.
In either case, you can try blocking it just to be sure. Sometimes web developers implement Google Analytics incorrectly...
Related
I’ve been experiencing a discrepancy in terms of page views between GA4 and GA3, both installed through GTM page view event.
I notice that GA4 is much slower to send the collect request compared to GA3, literally takes 3-4 seconds more from my office connection and pc.
I think that this is the main cause of discrepancy between the two.
Is it possible to somehow speed up GA4 tracker?
I remembered Google design this feature.
Here is the reference from a blog post
One thing you might have noticed is the delay it takes for the hit to
be sent. When you load the page, you can see how the browser waits a
few seconds before dispatching the hit to GA. This is because GAv2
batches requests automatically, which, again, is a great feature
upgrade.
Link
GA4 now will send multiple event as one request. But you don't need to worry about this will lost some event if user close the browser suddenly.
Here is the article from Google
Note: When a user's device goes offline (for example, a user loses their internet connection while browsing your mobile app), Google Analytics stores event data on their device and then sends the data once their device is back online. Analytics ignores events that arrive more than 72 hours after the events are triggered.
Link
I started to notice that my Google Ads clicks wasnt 100% counting by google analytics (For exemple, during a certain period I had 300 clicks and only 100 sessions were counted as Paid Search on analytics). So I contacted Google Ads Support, they investigated and came to me with this:
Actually, your site is losing the attribution of Google Ads because of an automatic redirection of the structure in which it was developed.
When we have Google Ads linked with Google Analytics, they are talked through a parameter called GCLID. To verify this loss, follow the path I made (in several products, here is an example):
1- I accessed the link https://mywebsite.com/products/running-shoes?variant=15320930779194
2- After full site loading, I added the & gclid = Tester123 parameter to the URL (in the browser, so the final URL was https://mywebsite.com/products/running-shoes?variant=15320930779194&gclid=Tester123) and hit Enter
3- To understand if there is a redirect, the normal behavior would be for the URL to remain the same (with & gclid = Tester123 at the end), but in this case, the parameter some (and hence the assignment)
So, the campaign actually appeared (not set) in Analytics, and could be assigned to any of the other channels (Direct, Organic, ...) For this to be resolved, the site structure must stop causing this automatic redirection in the final URL of each product. With this, the results will be effectively assigned to Google Ads.
They also said that if even if I want to use manual tracking (UTMs) I would still have that problem, since the redirections would keep spoiling it.
As I use Shopify as my website platform, I checked with them and I have no redirections that are causing this problem, at least not created by me nor that their support know.
So I am lost over all this. I dont know where to start solving this problem. Google doesnt tell me what kind of redirections may cause this, I dont use any kind of redirections, and Shopify cant tell me if their code causes this problem (what I dont believe, because other shopify websites would also been suffering from this).
So can anyone give me any direction about this? What redirections may be causing this lost of data?
Thanks for your time!
One thing to note, Google Ads might have a different way of counting, there is the possibility of multiple clicks per session.
That said, you can try Google Tag Assistant, start your recording, click on one of your ads, follow that through and see the parameters being passed.
Unfortunately, it is hard to debug with limited information. The more details you can provide the better.
Check where your GA code is placed in the page code. If GA script is at the bottom of page or there are some heavy scripts above GA tracker, losses of bounced sessions can be large. I.e. user enters the page and immediately closes it. GA script doesn't have time to download.
Why user closes the page immediately?
Сlick by mistake
Slow site
And check that all your landing pages are OK and have 200 server response.
A site I work with recently saw a doubling of it's direct traffic as recorded in Google Analytics. There doesn't seem to be a obvious external reason for the increase (like some promotion or something) so I'm looking into a possible technical reason.
When loading the homepage and monitoring Real Time Traffic Sources, I see two hits in rapid succession each time I reload the page.
However I'm using the GA debugger extension in Chrome and it's only showing the two expected function calls: ga('create') and ga('send', 'pageview').
The site has other event tracking set up but each event is wrapped in an event listener in JS so they aren't firing automatically. And if they were they should show up in the GA debugger anyway
So I'm at a loss. I can't think of why this is happening, let alone just for direct traffic as opposed to other sources. Anyone have any ideas?
Thanks!
I've researched but found some old information, and not exactly on topic. Also, my dev team is completely overworked and speak Chinese only, so I want to get as much work out of their hand.
We use universal analytics.
I have a multi-session goal. Users complete the sign up process, and an activation e-mail is sent to their account. After they click this link, they'll reach an ActivationSuccess page which immediately forwards them to the home center of the log in part.
Problem right now is that the forward goes too fast for GA to recognize the hit. I'm thinking about alternative solutions, and I think the hitCallback function is the best option.
My only concern is that if I add the hitCallback function and The Chinese Great Firewall blocks google, the Callback will never be made.
I'm thinking about different solutions, which will impact the user as little as possible, in order of preference:
Add the hitCallback, and know that Google will forward even if analytics.js can't reach the google page (this is my main question), or set a timeout.
Add the hitCallback + a 'click here' tag so that IF the callback doesn't come the user can manually forward himself, without sending the GA code.
Add a 3-second delay before auto-forwarding. This will surely fire the analytics.js script, but will impact the user experience heavily.
Add cookie tracking method: Add a cookie on the ActivatedSuccess page and retroactively send this in the next page. This is maybe the most elegant way, but requires more coding and a deeper understanding of GA than my Chinese dev team has.
So, I have three questions:
Will the hitCallback function still work if the host can't access Google?
Is it possible to create a timeout so that if users wait for more than 300 MS they get forwarded anyway?
Of my possible solutions, which one do you think would be the best, knowing that I have limited knowledge of coding and my dev team can't read Chinese?
(We don't use Baidu analytics, because that slows the page way down for users outside of China; up to 45 (!) seconds because they don't support asynchronous loading, Google works faster in China than Baidu in the West).
Thank you so much for your help!
Try This. It checks to see if GA is loaded. If not you can still place the redirect in the else.
https://www.domsammut.com/code/workaround-for-when-the-hitcallback-function-does-not-receive-a-response-analytics-js
I'm trying to set up some Google Analytics Content Experiments as mentioned here:
Google Analytics Content Experiments A/B testing server-side code without page refresh
I haven't gotten it working quite yet, and I keep needing to tweak my code and try out different things. Then I deploy to a testing server (to avoid the localhost problem with GA) and then use an online proxy website to visit the testing server (since my office IP is filtered out of my GA account). But then I need to wait roughly 3 hours before I see whether GACE graphs any visits.
Is it true that Google Analytics Content Experiments graphs are updated on something like a 3 hour delay?
Is there a way to see results sooner (to make my iterative tweaking/testing less time-consuming)?
The real-time feature (in beta) is very useful when it comes to testing this sort of thing.
Unfortunately it only supports page view. Events are not supported.
(you have to be admin on the account to see it)
http://analytics.blogspot.fr/2011/09/whats-happening-on-your-site-right-now.html