When you add any new scripts or tools to your website, your page speed may be impacted. This is because you are loading more resources onto the page when a user first lands on your site.
This applies to Termly and other consent management platforms as well. At Termly, we understand the importance of maintaining healthy page speed scores and we keep this metric in mind when developing our solutions.
Termly takes all necessary precautions to reduce the impact on page speed, including:
minimizing content shift on first page load when the banner appears
deferring loading content until it’s needed wherever possible
minimizing the size of the assets being loaded
What causes my page speed to be impacted when installing Termly?
The most likely reason why Termly and other consent management platforms could have an impact on your page speed is that they can be configured in a way that makes them render-blocking.
That is, your consent management platform will prevent other content from loading until it is finished loading. This is by design in some scenarios so that your consent banner prevents third party scripts (that could be sending sensitive data off-site) from loading before consent is given.
Strategies to improve your page speed after installing Termly
If you are experiencing disruptions to your page speed with Termly installed, you can try the following strategies to improve its performance.
Strategy 1: Serve the CMP asynchronously
Serving the CMP asynchronously allows the rest of your page to load without waiting for the CMP script to complete.
asyncattribute to your consent banner
Strategy 2: Defer the loading of the CMP
Deferring the script allows it to load after the page has rendered, potentially speeding up initial load times.
Defer the loading of Termly's script using the
deferattribute, or via other methods such as with a timeout
With the right site optimizations, it should be possible to get a page speed score in the high 90s, even with a consent management solution such as Termly installed.