seo-by-rank-math
seo-by-rank-math copied to clipboard
Use a static file when self-hosting GA
Describe the bug When self-hosting GA using the Pro version, GA is delivered using a query string:
https://domain.ext/?local_ga_js=e8ab1fdb027a3f6e62c1505e74e1b35a
Since it requires PHP to be served, the performance will depend on the availability of PHP workers and server resources to process the request.
In some cases, it can reach levels that will make self-hosting GA counterproductive.
Example:
Where it took 21s to load it.
It defies the purpose of the feature (speeding up the site by hosting external resources) and tracking as the visitor might have already left without the visit being recorded because of the delay.
It might be best to self-host GA on static files rather than using a query string to call them.
To Reproduce Steps to reproduce the behavior: N/A
Expected behavior Self-hosting GA shouldn't have any overhead on the server and should be faster than using GA's CDN.
Screenshots Attached to the description.
Desktop (please complete the following information): All.
Smartphone (please complete the following information): All.
Additional context Curious to know why RankMath is using the query string to self-host GA!