Yes to everything. First of all the local javascript is loaded. After some interaction the analytics.js from google server is loaded.
For example first load it’s fd89fbf1.js, after the interaction it’s also https://www.google-analytics.com/analytics.js but not before. The initiator is the first local file leading to gtag which leads to analytics.js
Is this analytics.js needed? Is it important to load together with the first local file or could it be delayed?
We use asynchronous gtag.js (v4 beta) settings in your plugin.
I’m thinking that delaying analytics means that people bouncing from the site will not load it and therefore our stats will be wrong without those pageviews??
Thanks.
Edit: For some reason I am unable to run analytics.js together with the local file. However still, it doesn’t make sense to load the file when it’s locally set. And, if I switch to analytics.js or gtag.js (not the beta version) then gtag neither analytics is loaded. It looks like it’s loaded only with the beta ga4 version…
Edit 2: Hm, alright, using gtag.js and dual tracking means that 3 local javasccripts are loaded.
In my opinion, if first script loads fine and others are after some interactions then GA4 using gtag is not correct, right? But loading three files instead of one is not really an optimization here in my opinion. Also, if using GA4 beta why the second file is not hosted locally as well?
-
This reply was modified 2 years, 1 month ago by keengamer.
-
This reply was modified 2 years, 1 month ago by keengamer.
-
This reply was modified 2 years, 1 month ago by keengamer.