Do PageSpeed Insights CWV timings filter to landing/entry visits only for a URL or include all visits to the URL? - pagespeed

Does anyone know if PageSpeed Insights calculates Core Web Vitals timings only incorporating data points where the URL specified is the landing/entry action for a session (visit), or if it will calculate timings whether that URL is the landing action or any other action in the session?
I'm asking this because 75th percentile timings would be different (likely higher) if we were only looking at landing actions vs if we included instances of users coming to the page cached later in a session. I would think for SEO we'd be focused more on landing action timings, but I'm not sure what methodology Google uses.
I've tried reading through the PageSpeed Insights documentation and CrUX documentation, but it's still unclear to me.

All data sourced from the Chrome User Experience Report (CrUX) (which is where the field data from PageSpeed Insights comes from) is based on all page visits from users who have not opted out in some form:
From the CrUX documentation:
The Chrome User Experience Report is powered by real user measurement...across the public web, aggregated from users who have opted-in to syncing their browsing history, have not set up a Sync passphrase, and have usage statistic reporting enabled.
So to answer your specific question, no it is not just based on landing page visits or clicks from Google Search. And yes, properly optimized caching headers and other things that improve the experience of returning visitors can help to improve your Core Web Vitals scores.

Related

Discrepancies between Analytics and Shopify sessions

I've been looking at my statistics and lately, I found a difference between the number of sessions in Google Analytics and Shopify.
Google Analytics reports 20% fewer sessions than Shopify...The implementation between Analytics and Shopify seems to be ok, as there isn't any duplicate code or tag.
Do you know how I can solve this?
I've read some similar questions but I haven't found an answer yet.
There are many possible reasons for differences in tracking results:
Differences in how page reloads and unique visitors are counted. Google counts every page reload, but a browser doesn't count reloads of cached pages.
Differences in how sessions are defined. For example, some analytics software counts search bots as visitors, while other software doesn’t.
Google can only count visitors with JavaScript and cookies enabled. Some visitors might not allow cookies or JavaScript.
Customers can use browser extensions to block Google Analytics from tracking their sessions and purchases.
Discrepancies might be introduced because of different reporting time zones. Read about changing your Google time zone here.
It’s unlikely that identical tracking mechanisms are being used by each of the services, so your visitors aren't recorded equally. Details of recording mechanisms are proprietary information and are never shared.

I deployed a Meteor site about a week about and told no one. Google Analytics says I have 312 users & 345 sessions. Why?

I'm very new to online analytics. I just deployed a site a few days ago, told no one, and Google Analytics is saying I have hundreds of users and sessions all over the world.
Even if events are logging from my own development, there shouldn't be so many users (and so many sessions...I'm not developing THAT vigorously.)
Also, my server logs indicate the level of activity I expect: ~0. So it's not like I'm magically getting traffic somehow. It really is nonexistent.
What could be going on? I can understand seeing a few sessions here and there, for web crawlers, but I don't understand why the numbers are so high.
Any common gotchas?
I realize this is a vague question, but I'm not sure what other information to provide, so please let me know what I can do to help.
Traffic source
First check, if traffic comes through your website (through your analytics.js library). To do this, just remove analytics.js for a while and check, if traffic is still going into Google Analytics (e.g. Realtime report).
If is still going, maybe somebody use Measurement Protocol to spam your account.
To prevent this, add, for instance, custom parameter into your call and create filtered view only for this. All without this param, throw away.
Check sessions and returning visitors
Check, if the traffic is random (usualy one pageview per session) or if the behavior of users is normal.
Custom client ID
Check if you dont play with client ID in analytics.js configuration. IF you dont have random number generator there.
Check traffic source (referal), browsers
If there is one significant, or there is some pattern in versioning (absolute randomness is pattern too)
Preventing random access through website
For every visitor who is first-time on your page, set up a cookie with current timestamp. If cookie is not older than e.g. hour or day, do not track this user. Or buffer hits and fire them later after you prove the user is real.
Anyway, if you have some new hints or information from your analysis, we should help you better. This is still like reading a magic sphere :-)

Google Analytics not tracking all page views

How (im)precise is Google Analytics actually? I've been using Google Analytics for years now on a pretty well visited web site (800k+ visits per month).
Now I decided to log every page request in a database table, and I'm tracking the user-agent of the request. I have also eliminated bot requests (googlebot, bingbot and many more...)
What I found out is that I have almost more than double requests to a page than Google Analytics pageviews is willing to admit.
E.g. GA shows 137 pageviews to a specific URL, but I tracked even 255!
Google Analytics is VERY precise. It's not very accurate though. And that's the difference you're seeing since you're not looking into trends but instead at absolute numbers.
Start by reading this post by Avinash:
Reflections: Accuracy, Precision & Predictive Analytics
Bots are everywhere these days and a lot of times disguised as real user agents. You should come up with a testing to make sure client have both javascript and cookies enabled. In that case he'll be tracked by Google Analytics.
Besides that that some users might have adBlocks extensions that block Google Analytics. This is fairly uncommon but depending on the public can be more common. Tech savvy users have a higher chance to use a plugin that blocks GA, thus IT blogs might be hit by this harder than an average site.
The best way to test the real accuracy of Google Analytics ignoring user agents without javascript, cookies and that block GA tracking is to track the users on your site using GA as well. You can do that in Google Analytics using the LocalRemoteServerMode.
Add the following line at the end of your GATC (GA Tracking Code):
_gaq.push(['_setLocalGifPath', 'http://mysite.com/__utm.gif']);
_gaq.push(['_setLocalRemoteServerMode']);
Make sure to replace http://mysite.com/__utm.gif with a path on the same domain as your website and that respond a gif. Use a lightweight gif, like the one GA uses.
Then you can get the logs of access to this gif and see in their parameters the urls visited. You'll need to do some extra processing but you'll be using the same framework GA uses to collect data and thus will measure more efficiently GA precision.
More Info:
https://developers.google.com/analytics/devguides/collection/gajs/methods/gaJSApiUrchin#_gat.GA_Tracker_._setLocalGifPath

Why do Facebook Insights and Google Analytics report different visitor counts?

I'm using both on a site and getting very different numbers from each. Why is this?
The discrepancy is also mentioned in a Quora answer (Which is better, Facebook Insights or Google Analytics?)
Footnote: if you decide to use both, do not report them side-by-side,
and never expect them to match. Trying to explain the differences will
drive you mad.
Could someone explain?
This problem is quite common, and very hard to explain to clients why numbers do not reconcile amongst different analytics platforms.
Firstly, I believe that because there are remote connections to google or facebook some user sessions will get lost (What happens when they hit stop on the Browser page before the .js downloads for instance).
Secondly I believe ad blocking software may stop the file from being downloaded therefore the session is not captured.
Most hosting providers will have their own analytics platform with your hosting package. This is what I rely on as a true indicator for actual page views etc. These are usually generated directly from your web server logs so they are more accurate. Sadly I've never seen one of these packages have as many features as google or facebook.
There are tons of possible reasons. They might identify returning visitors in a different way or users might block scripts from a specific domain (e.g. *.facebook.com but not *.google.com). In general, ignore the discrepancy. Just pick one solution and use it. You'll always have visitors blocking all such scripts or just one or two specific trackers. The only (almost) 100% accurate way to do it, would be using local scripts, but even those could be blocked. You could as well look at open source solutions such as Piwik
Different web analytics products use diferent methods to track data on the site.
These differences between them is the reason why is hard do do a side-by-side comparison.
On the two links bellow you can find more info about that:
Why does Google Analytics report different values than some other web analytics solutions?
Using Google Analytics & Facebook Domain Insights to Track Social Actions on Your Website
In addition to the notes above, I also wanted to mention Google samples data when there are large volumes & dimensions. This may be a contributing factor.
Facebook reports on clicks and Analytics reports on pageviews.
The amount of pageviews might be less than the amount of clicks for a number of reasons:
There are filters on your Analytics that are blocking the pageviews from being recorded
The user left the page before the Analytics code could be recorded
Or the ads being clicked by bots and the Analytics isnt recording them
This seems to be a big problem with Facebook ads. I run a number of campaigns with facebook and I only see 30-50% of the reported traffic actually make it to the site. I cant believe this is due to only the first two reasons.
I have gone into more details on my blog http://www.bradtollefsen.com/facebook-ads-adding/

Google Analytics posts monitoring addon for WordPress

I'm assigned to create a WordPress plugin that displays recent visits graph under each post in WordPress. I'm struggling with the authentication of the data and general structure of plugin. My first question would be whats the most efficient way to authenticate with Google API for this kind of task?
I was looking into the AuthSub but i cant understand the concept of next parameter in the query. It should be the landing page after authorization, but how can i make it work dynamically with all the different posts?
In OAuth i'm getting a bit lost in terminology.
Second question is how often should the Google API be queried for the results. I mean is it rational to make smaller request every time visitor opens a page or maybe its rater optimal to download the data for the pages once and keep it in local xml and refresh it on some intervals?
As an idea of the plugin overall structure i was thinking of making a php file which would generate the graph out of the GA feed and would do it so when called from post hook via ajax. This would be controlled by passing parameters of the post to that php file.
Would that structure make sense or there is an easier way to preform the task?
I would really appreciate if someone pointed me in right direction especially in authentication problem.
The most important thing to do first is to lay out your design. You don;t want the user of your site to authenticate on the GA API. Because he doesn't have access to your data. So you'll have to login with your own credentials on the backend. And just cache the metrics you want to display on the screen. So, from the user perspective, there's no way to tell if you're using Google Analytics or any other web analytics product.
Since you're working with Wordpress and you'll need to do the data pull on the backend you probably want to do that using PHP.
You should take a look at this PHP library.
http://code.google.com/p/gapi-google-analytics-php-interface/
Even though it's not google officially supported it's pretty good and you won't have to worry about the process of authentication.
It doesn't make sense to query GA every time the user visits your site. Besides impacting the load heavily the GA API has some latency and GA is not a real time tool. The data freshness on your GA data depends on how much data you get. If you are a small blog it can take 2-4 hours to process the data. If you're a big blog it can take up to 48h. So for that reason I'd query the API every 4 hours or so and just cache the data for all your pages. When you render the page it's just a matter of getting it from the cache/db.
To plot that data there are plenty of options around there. I'd suggest you to start with Google Chart Tools.

Resources