Remove portal code from site when not used

I can only reproduce getting portal to appear in “Remove unused javascript” if I also have other unused JavaScript on the page. i.e. it alone doesn’t pass the threshold.

The script is also already included with “defer”.

I recommend making sure you run lighthouse in an incognito window as well to ensure you’re getting correct and consistent reports.

We are constantly reviewing the script to keep it as small as possible, and we regularly review lighthouse to ensure there are no issues cropping up. The script is 70kb gzipped, I’m not sure why lighthouse reports it larger but will review this.