georgringer / page_speed
Performance & Usability are important to any site. Check every page for it and know how the site can be improved.
Installs: 8 136
Dependents: 0
Suggesters: 0
Security: 0
Stars: 16
Watchers: 6
Forks: 4
Open Issues: 1
Language:HTML
Type:typo3-cms-extension
Requires
- typo3/cms-core: >=7.2.0
Replaces
- page_speed: *
This package is auto-updated.
Last update: 2024-11-12 04:24:42 UTC
README
This extensions provides an entry in the info module to check the usability & performance of the selected page by using the API of Google PageSpeed Insights.
Every page is automatically checked for the resolution desktop & mobile.
Screenshot
Requirements
- TYPO3 CMS 9.5+
- Google Account
Installation & Configuration
The extension just needs to be installed as any other extension. To make it work, you need a Google account and activate the PageSpeed service. After successfully activating the PageSpeed service you need to set the key in the configuration in EM and deactivate the demo mode.
Enable PageSpeed Service
- Open console.developers.google.com and create a new project.
- Open the project and switch to APIs and auth > APIs, select PageSpeed Insights API and Activate the API.
- Switch to Credentials and click the button Create new key for public API access.
- Create either a Server key or a Browser key*.
- Test the access by using cUrl on the server where you want to use the extension by calling the command
curl 'https://www.googleapis.com/pagespeedonline/v2/runPagespeed?strategy=desktop&url=http://www.bbc.co.uk/&key=AIzaSyA2rQEy7UyQz-9D1-7bnmw1jzSo0FmobYM'
. (If you get aBad request
, just wait a few minutes to get the key deployed on all Google servers)
Preview Domain
If you need to use a different domain in the frontend or no sys domain record is available, you can use the following configuration inside your PageTsConfig:
TCEMAIN.previewDomain = localhost/sites/t3/master
Avoid error "require_once(Net/URL2.php)"
If you see an exception about the
file Net/URL2.php
not found, please open the file typo3/contrib/vendor/pear/http_request2/HTTP/Request2.php
and
remove the require_once statement in line 24. This bug will be gone soon.
Technical background
A little bit technical information for the ones who are interested in:
The API is described in detail at developers.google.com/speed/docs/insights/v2/reference/pagespeedapi/runpagespeed and it is very simple to test by just using curl:
# Desktop curl 'https://www.googleapis.com/pagespeedonline/v2/runPagespeed?strategy=desktop&screenshot=true&url=http://www.typo3.org&key=<your_key>' # Mobile curl 'https://www.googleapis.com/pagespeedonline/v2/runPagespeed?strategy=mobile&screenshot=true&url=http://www.typo3.org&key=<your_key'
Further development
Todos
- Record selection
- Check if current page or rootline is restricted
- Check if current page's translation should not be be shown
- Auto cleanup after page cache clearing