How to Track and Optimize Third-Party Domain Requests in WordPress (An Expert‘s Guide)

As an experienced webmaster with over 15 years in the industry, I know that slow page speed is one of the biggest problems facing WordPress sites today. Even a well-optimized site can suffer from sluggish performance due to third-party requests loading extra resources.

In this comprehensive guide, I’ll explain what third-party requests are, why they matter for WordPress performance, and share 6 proven methods to track and optimize them on your site.

Why You Should Care About Third-Party Performance

Before diving into how to optimize third-party requests, let’s look at why you should care about these extra resources bogging down your site:

  • 53% of mobile site visitors will leave a page that takes over 3 seconds to load. Fast performance is crucial for keeping visitors on your site. [Source]

  • Pages with faster load times can achieve over 30% higher conversion rates. Improving speed with optimized third-party requests means more sales and leads. [Source]

  • Faster sites get higher rankings on Google. Page speed is a factor in Google‘s site ranking algorithms. [Source]

Clearly, tackling third-party performance issues should be a priority! Even on a well-optimized site, extra requests can steal crucial seconds from your load time.

Now let’s look at what exactly third-party requests are and how to identify them…

What Are Third-Party Requests?

A third-party request refers to any external resource loaded from a domain outside of your WordPress site. Some common examples include:

  • Social media assets (Facebook, Twitter, Instagram)
  • Advertising networks like Google AdSense
  • Analytics services like Google Analytics or Matomo
  • Widgets and embeds from other sites
  • Content Delivery Networks (CDNs)
  • Javascript frameworks like jQuery
  • External fonts, icons, images, and scripts

While many third-party requests are necessary for certain functions, others may be unintentionally bogging down your site. Identifying and optimizing these requests is key for improving WordPress performance.

How To Track Third-Party Requests in WordPress

Now that you know what third-party requests are, let’s go over a few easy ways to identify them:

Using Pingdom

Pingdom is a popular uptime and performance monitoring tool with a free plan. To use Pingdom to find third-party requests:

  1. Go to Pingdom‘s Website Speed Test

  2. Enter your website URL

  3. Click "Start test"

  4. Scroll down to the "File requests" section

Here you‘ll see a list of all resources loaded on the page, including the domain, file type, and size. Any requests not from your domain are third-parties.

For more details, hover over a request in the waterfall chart to see exact load times and steps. This helps identify requests slowing down your site.

Checking Google PageSpeed Insights

Google PageSpeed Insights is another free tool that checks your site‘s performance.

To use it to find third-party requests:

  1. Go to PageSpeed Insights

  2. Enter your URL and hit "Analyze"

  3. Scroll down to the "Dependencies" section

This shows all third-party requestsGoogle has identified, along with their size and load impact score. Focus on any high impact requests first.

Using Chrome Developer Tools

You can also use Chrome Developer Tools to identify third-party requests right from your live site:

  1. Open your site in Chrome and pull up DevTools (Ctrl+Shift+J)

  2. Go to the Network tab

  3. Reload the page and analyze the requests

Look for any calls not made to your domain under the Name column. Check the Time column to find resources with long load times.

Using a WordPress Performance Plugin

For an inside look at third-party requests over time, a performance plugin can help. Tools like Speed Booster Pro track analytics around external assets.

The best way is using a combination of these tools to build a complete picture of the third-party requests happening across your site. Now let‘s talk about how to optimize them!

6 Ways to Optimize Third-Party Requests in WordPress

Once you’ve identified the biggest third-party performance drains, here are 6 proven optimization strategies:

1. Remove Unnecessary Requests

The most direct way to optimize third-parties is simply removing any unnecessary requests. For example, you may find plugins with external requests that are no longer needed.

Or you could remove an external font that’s slowing things down. Before removing anything, test that it’s not impacting other functions on your site.

2. Consolidate Multiple Requests

Do you have several plugins making calls to different third-party analytics tools or social networks? Consolidate these separate requests with a single comprehensive tool when possible.

For example, replace multiple SEO plugins with an all-in-one tool like AIOSEO. The key is minimizing total external requests.

3. Preconnect to Key Domains

Preconnecting establishes a link between the browser and key domains early in the loading process. For third-parties used across your site, preconnecting can save precious milliseconds.

Use a snippet plugin like WPCode to add preconnect tags:

<link rel="preconnect" href="https://domain.com"> 

Prioritize resources that are crucial for load speed. Avoid preconnecting to everything, as it takes resources away from other loading.

4. Prefetch DNS Requests

DNS prefetching performs DNS lookups in the background before resources are needed. This is helpful for requests on every page like analytics and social scripts.

Again, use WPCode to add prefetch tags to your header:

<link rel="dns-prefetch" href="//domain.com">

This allows the browser to cache DNS info ahead of time rather than lookup every request.

5. Host Resources Locally

Whenever possible, host third-party resources directly on your own server. Resources hosted on the same domain as your WordPress site typically load much faster.

For example, hosting Google Analytics scripts locally with MonsterInsights removes external requests. Other options include self-hosting fonts, images, CSS, and JS.

6. Optimize With Caching and CDNs

Even when third-parties must be external, you can still optimize them through caching and content delivery networks (CDNs).

Caching stores resources so repeat visits don‘t require re-downloading. CDNs distribute resources globally from servers close to visitors. Combining caching and CDNs accelerates external assets.

Bonus: Lazy Load Non-Essential Requests

Lazy loading only loads resources as they become visible on screen. While not always practical for crucial assets, lazy loading can improve perception of load times for non-essential third-parties.

There are many other potential optimizations like minimizing file sizes, using browser caching, etc. But these 6 methods can eliminate the largest third-party performance drags.

The key is continuously monitoring third-party requests and optimizing over time as needs change.

Take Control of Third-Party Performance in WordPress

I hope this guide gave you a comprehensive look at how to track down and optimize third-party requests slowing down your WordPress site. Just a few unnecessary requests can have a surprising impact on load speed.

The tools above help you stay on top of exactly which external resources to focus on. Then use the right optimization strategy for each request, from removal to consolidation to local hosting.

With these steps, you can take back control over third-party performance issues in WordPress. Let me know in the comments if you have any other tips for speeding up external requests!

Written by Jason Striegel

C/C++, Java, Python, Linux developer for 18 years, A-Tech enthusiast love to share some useful tech hacks.