# Impact of 3rd Party JavaScript

**URL:** <https://discuss.httparchive.org/t/impact-of-3rd-party-javascript/1564>\
**Category:** Analysis\
**Created:** [February 8, 2019, 4:15pm UTC](https://discuss.httparchive.org/t/impact-of-3rd-party-javascript/1564 "2019-02-08T16:15:48Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![patrickhulce](https://yyz1.discourse-cdn.com/flex035/user_avatar/discuss.httparchive.org/patrickhulce/32/780_2.png) [@patrickhulce](https://discuss.httparchive.org/u/patrickhulce)\
**Post date:** [February 8, 2019, 4:15pm UTC](https://discuss.httparchive.org/t/impact-of-3rd-party-javascript/1564/1 "2019-02-08T16:15:48Z")

</div>

tl;dr - the top 100 3rd party scripts account for more than half of all JavaScript execution time

There have been some [great explorations](https://discuss.httparchive.org/t/js-requests-size-1st-party-vs-3rd-party/1509) into [this topic](https://discuss.httparchive.org/t/what-is-the-distribution-of-1st-party-vs-3rd-party-resources/100/5) before but mostly centered around number of requests, total bytes, etc and correlating to performance, so I poked around for some direct answers about _execution time_. I’m excited about this start and the possibility to dive deeper into individual scripts, libraries, etc in the future!

Detailed queries and reports with third-party rankings are over in [https://github.com/patrickhulce/third-party-web](https://github.com/patrickhulce/third-party-web), but here are some highlights:

- Third-parties account for ~65% of all JavaScript execution.
- Top 100 third-parties account for ~59% of all JavaScript execution.
- Ads are the biggest chunk of third-party execution at ~23%.
- Just Google Ads and Google Tag Manager account for ~22% of all JavaScript execution.

**Breakdown of 3rd Party Execution by Category**  
 ![breakdown by-category](https://canada1.discourse-cdn.com/flex035/uploads/httparchive/original/2X/5/50220fbaad54f56f8ff11911f0351429689cf456.png)

Feedback and contributions welcome! I’ve only identified ~90% of the third-party script execution origins so far, so help wanted on the long tail 🙂

---

<div class="post-metadata">

**Author:** ![ChrisLove](https://yyz1.discourse-cdn.com/flex035/user_avatar/discuss.httparchive.org/chrislove/32/1456_2.png) [@ChrisLove](https://discuss.httparchive.org/u/ChrisLove)\
**Post date:** [February 8, 2019, 4:43pm UTC](https://discuss.httparchive.org/t/impact-of-3rd-party-javascript/1564/2 "2019-02-08T16:43:21Z")

</div>

Patrick,

Awesome research!!!

Just scanning through the document, did you use the desktop or mobile archive? The reason I ask is a lot of the speeds seem a bit faster than I see when I test against mobile devices.

---

<div class="post-metadata">

**Author:** ![patrickhulce](https://yyz1.discourse-cdn.com/flex035/user_avatar/discuss.httparchive.org/patrickhulce/32/780_2.png) [@patrickhulce](https://discuss.httparchive.org/u/patrickhulce)\
**Post date:** [February 8, 2019, 5:26pm UTC](https://discuss.httparchive.org/t/impact-of-3rd-party-javascript/1564/3 "2019-02-08T17:26:45Z")

</div>

Thanks Chris!

The latest data was taken from mobile (httparchive:lighthouse.2019\_01\_01\_mobile). The numbers do intuitively feel a bit lower than what I might expect, but this is mostly capturing all initial script executions.

Async tasks scheduled with `setTimeout`/`fetch` callbacks tend to lose their attribution entirely right now. There’s work in progress in Lighthouse that should help close this gap soon.

---

<div class="post-metadata">

**Author:** ![hyperpress](https://yyz1.discourse-cdn.com/flex035/user_avatar/discuss.httparchive.org/hyperpress/32/1510_2.png) [@hyperpress](https://discuss.httparchive.org/u/hyperpress)\
**Post date:** [April 9, 2019, 5:50am UTC](https://discuss.httparchive.org/t/impact-of-3rd-party-javascript/1564/4 "2019-04-09T05:50:00Z")

</div>

Awesome datasets and analysis, Patrick. All highly significant. Thank you for doing this.

---

<div class="post-metadata">

**Author:** ![reubenrajan](https://yyz1.discourse-cdn.com/flex035/user_avatar/discuss.httparchive.org/reubenrajan/32/1576_2.png) [@reubenrajan](https://discuss.httparchive.org/u/reubenrajan)\
**Post date:** [May 20, 2019, 7:43am UTC](https://discuss.httparchive.org/t/impact-of-3rd-party-javascript/1564/5 "2019-05-20T07:43:50Z")

</div>

This is a really good analysis and great work!
