Last post 41 min ago
Posts last week 141
Average response time last week 4 hours 42 min
All time posts 67778
All time tickets 10473
All time avg. posts per day 21

Helpdesk is open from Monday through Friday CET

Please create an (free) account to post any question in the support area.
Please check the development versions area. Look at the changelog, maybe your specific problem has been resolved already!
All tickets are private and they cannot be viewed by anyone. We have made public only a few tickets that we found helpful, after removing private information from them.

#6784 – Analytics Cache

Posted in ‘SEOInfo and other Weeblr extensions’
This is a public ticket. Everybody will be able to see its contents. Do not include usernames, passwords or any other sensitive information.
Monday, 05 November 2018 17:50 UTC
I did a Pagespeedtest with Google and it suggest me to set the Google Analytics Cache to 2 hours.
On my Website i use sh404sef for the implementation.
Is there a way to set this suggestion to fulfill more Google guidelines.
Maybe if the option is not implemented yet could this come in a future update?
Thanks a lot for your help.
Monday, 05 November 2018 18:17 UTC

Well, that file is coming from the Google servers so you'll have to ask Google to add caching to it :)

And yes, it's interesting to see the Google/Analytics does not follow the guidelines in Google/PageSpeed. But it's a good illustration of the fact Google PageSpeed is only providing that, guidelines, and each proposal they made has to be evaluated carefully in each case. Some suggestions may actually be negative in some situations.

Best regards
Monday, 05 November 2018 20:23 UTC
Ok Thanks for your information. It really seems strange why Google then suggest that if they dont hold on their own hosted cache guidline haha

But anyway i also searched a little and found this Infopage for an other solution which would be a great alternative (or lets say maybe an extra way you could implement in a future update to integrate as an alternative for users who dont want the original Google Analytics)

I would love to change the option for a few facts. Because its smaller, users can decline in browser with the dont track flag and most of the features are available and its cacheable)
So maybe it is another great option for a next update :)
Wednesday, 07 November 2018 10:34 UTC

Well, again, this is one of those situations where recommendations from Google Page speed should be taken with a grain of salt. The 2 caching time is fine to be honest, it allows frequent updates from the script with very good caching. It means the script will be actually downloaded only every 2 hours so it will affect only a very small number of URLs and really is not something that will affect user experience.

On the other hand, scripts similar to the one you linked to - it's not complex, we even have one of our own for some internal servers - appears like a good idea but may not always be. Issues are:

- missing features and reliance on 3rd party fro bug fixes and new features - Client ID api for instance
- the script will be downloaded from the user server, which will always be much slower than Google's
- more importantly, for most pages of most sites, there will be no download at all because the Analytics script is the same for every one and most sites have it. So even when you come to a site for the first time, the Analytics script is already there, from another site and does not need to be downloaded.

When using a 3rd party script, then it will have to be downloaded separately for each site which is a net loss.

I have looked at this in the past a few times but the conclusion is always the same, pros and cons are in favor of using the original script.

What would be a real change is to use something like Matomo (ex-Piwik), but that's a totally different thing of course.

Best regards
This ticket is closed, therefore read-only. You can no longer reply to it. If you need to provide more information, please open a new ticket and mention this ticket's number.