This page indicates that it uses a custom user agent but it does not mention the name. I would like to be able to run some logic if the user agent is from PageSpeed. What is the name of the Google PageSpeed user agent?
The information in other answers is outdated: currently, Google PageSpeed does not pass the «Google Page Speed Insights» string in its User-Agent
HTTP header, it passes the «Chrome-Lighthouse» string instead.
An example:
Mozilla/5.0 (Linux; Android 6.0.1; Nexus 5 Build/MRA58N) AppleWebKit/537.36(KHTML, like Gecko) Chrome/69.0.3464.0 Mobile Safari/537.36 Chrome-Lighthouse
Please note that the string is exactly «Chrome-Lighthouse» even if you run Google PageSpeed in other browsers (e.g. Firefox).