Is Google analytics script worth removing to improve my page speed? - pagespeed

I have an image heavy art site and my FID score needs improving. The new Google algorithm taking place in June is going to punish me for having pages that take 256ms to load , but google analytics script takes up 156ms of that.
Should I remove it?

Remove only if you think Google Analytics is not important for you, There are some hacks which I personally do not recommend to resolve GA script issue shown in PSI but if you still wishes to resolve you can find helpful answers in this post. PageSpeed Insights 99/100 because of Google Analytics - How can I cache GA?

Related

Pagespeed + yandex metrika + google analytics = bad speed

I need help to optimize my website ggsel.com. I use counters of google analytics and Yandex Metrica. If I drop these counters then I get very good results by page speed, but if I put these counters in my page result is bad.
I attached screenshots from page speed to this post. Please tell me, how to save these counters and getting the best result from page speed. And maybe can you give me some advice for me. How I can better FID and FCP for my site?
with metrica and analytics
without

shopify number of transactions discrepancy with google analytics

It might be a very stupid rocky question but I’ve never worked with Shopify before.
We have implemented Google Analytics via default functionality available with Shopify Plus. On top of it, I have added quite simple JS to track Consumer Funnel Steps and activated enhanced ecommerce feature.
One month later I have discovered the discrepancy in both number of transactions reported and the revenue that is nearly 50% which clearly indicates that something went wrong. My investigation has shown no patterns from the point of payment method/checkout process/device category. Our success manager told us that the process looks ok from their end and the issue is on our end.
Please help me to understand where else shall I look to identify the bug. Thanks!!
This is a common issue for Google Analytics and it happens on all ecommerce platforms and the main reason behind it is ad blockers.
About 20% of users use ad blocking extensions which prevents Google Analytics from firing and capturing any data regarding that visit (this also includes ecommerce data), thus, discrepancies are created between the numbers reported in Shopify backend and Google Analytics.
There are more reasons behind why the discrepancies might happen (some of them are of legit concerns like faulty tracking) but ad blocking extensions are probably responsible for most of the discrepancies. If interested, you can see the full list of transaction discrepancy causes here.

Google Tag Assistant records multiple duplicate Google Analytics Tags

So since a few days my bounce rate dropped massively in Analytics. I found out the Google Tag Assistant records 3 Analytics Tags on the website, which apparently is a big reason why GA suddenly drops the bounce rate, but I can't figure out why. The URL is: https://www.krant.nl/abonnement/hp/index.html
Since I tried about everything, went back to the version where it still worked, still no luck. I also can't seem to find any weird things in the website code itself.
I hope the question is clear, if I need to provide any more information please let me know.
In your website it's firing Universal Analytics 3 times because you are using https://vwo.com/. If you will delete it, it will fix problem

Google Analytics reporting data before tag is even up

So I've been working on a website for a while. GA account has been up for a couple months but I waited for the website to be finished before putting up the actual JS tag.
In the meantime, the website is being HTTP password restricted (basic authentication) so it isn't even accessible unless you know the user/pwd combination.
To my surprise, I realized today that GA has logged several hundred views to the root of my website. Paths are mostly things like:
/
/?from=http://social-widget.xyz/
/?from=http://www.traffic2cash.xyz/
Bounce% and exit% both at 100% for all of them.
I realize this looks like referral spam, and there are ways to prevent it. Came across this upon googling:
http://botcrawl.com/block-social-widget-xyz-referral-spam-in-google-analytics/
My question is: how can GA log anything anyway when no tag is up and the website isn't even accessible?
Thank you very much in advance
Because it's spam. They hit Google Analytics directly with random GA codes and don't even go through your website.
GA can't tell if these are real hits (from website visits) or fake hits (from spam bots who hit GA directly calling the same ode as they would if on the website). Though arguably they should do more about this.
Massively annoying - particularly when first starting out as this can be a heavy proportion of your "traffic".
It's easy to set up a filter rule is to catch a lot of this by filtering on hostname. As they are randomly hitting GA and don't even know what website they are hitting GA for, they don't usually set this correctly. Real traffic should only come from yourwebsitedomain.com so add a filter for that.
STRONG piece of advice: abandon the default UA-########-1 tracking code of your new website -- simply do not use it!
Create a second and third property on the Admin screen, then use the tracking code for the third property. You will immediately see a lot less spam. No filters or segments necessary!
If you want the whole sad story about spam visits in GA, I have been maintaining the Definitive Guide article for over a year now:
http://help.analyticsedge.com/spam-filter/definitive-guide-to-removing-google-analytics-spam/

How can i change the expiry of Google Analytics.js from 12 hours?

Can you tell me how to increase the expiry time of the Google Analytics. All the page speed tests are telling me to increase it beyond 12 hours.
So far I have tried setting the expiry in the .htaccess file for all *.js files but it doesn't have any effect. I have also searched on the Analytics help pages and forum, without success.
You can download/host it yourself -- just make sure you follow the Google Analytics ga.js Changelog and update it when applicable.
Note: PageSpeed is a recommendation, not a 100% steadfast rule. I'd be willing to bet you're over-optimizing something seemingly easy and could focus on other internal efforts for better performance gains. Give Yotta a shot and see what they say/think.

Resources