Third-party scripts are everywhere on the web today. They’re used for ads, analytics, social media and countless other purposes, and are often managed manually or with tag managers. These scripts can provide a lot of business benefit, but they can also cause chaos when it comes to site performance and manageability if they get out of control.
Even with the best third-party script providers, issues can arise. One significant example: the recent, hours-long Google DoubleClick outage, which impacted the performance and general user experience of hundreds of sites.
How can you get the benefit of third-party scripts and still manage the risk?
Script Management, available through Akamai Ion as part of the Akamai 2018 Spring Release, is a new product designed specifically to help you successfully manage the impact third-party scripts have on your site and to help protect against unresponsive scripts.
How does Script Management work?
Script Management uses real-user monitoring (RUM) data to get insight into what’s happening on your site. Armed with this data, Script Management will:
- Automatically detect unresponsive third parties on your site and take action without changing your site or making risky config changes
- Enable you to discover and mitigate performance impact from all scripts on your site, even from tag managers on a case-by-case basis as you deem necessary
To illustrate our point on the value of Script Management in situations like the outage referenced above, we ran a simulation where a critical third-party domain became unresponsive when loading a page. We did this across several sites with two scenarios (Script Management OFF and Script Management ON) and then looked at the resulting page load times. The results in the chart below speak for themselves in terms of the potential protection you can get from Akamai Script Management: without Script Management, page load times jumped upward as much as 4x.
How did we run the simulation? (The nitty gritty details)
We know that developers love delving into the details, so here are the particulars on how we ran this test.
The simulation was created with Script Management using the WebPagetest SPOF feature to show how a site benefits from having Script Management. We went through these three steps:
We picked a few random sites and then picked a domain on each page to simulate a failure on.
We scripted WebPagetest to first install Script Management, and then navigate to the page we wanted to test. The script we used looks like this:
logData 0 //disable WPT logging for the step that loads the service worker navigate https://<url to install service worker> logData 1 //enable logging now that we want to capture the waterfall setDnsName <domain to simulate failure on> blackhole.webpagetest.org navigate https://<page to see how Script Management works>
- For comparison, we then re-ran the same test but this time with Script Management disabled. Script Management is disabled by adding the header
X-Akam-SW-Disable-For-Page: true. The script now looks like this:
logData 0 navigate https://<url to install service worker> logData 1 setHeader X-Akam-SW-Disable-For-Page: true setDnsName <domain to simulate failure on> blackhole.webpagetest.org navigate https://<page to see how Script Management works>
Third-party scripts can provide considerable business value to a website, but they also pose potential performance risks and can significantly impact end-user experience. Akamai Script Management addresses those risks by automatically protecting your site and providing third-party script visibility. As seen by the simulation above, Script Management can not only help you avoid costly outages but can also dramatically increase your site performance when scripts are present.
Carm Janneteau is a senior product manager at Akamai Technologies.