Path Path

Third-Party Scripts on Car Dealer Websites

Third-party scripts take on many forms and functions on your car dealer website. To ensure your website performs at it’s fullest potential, you should regularly monitor the scripts on you website.

What are third-party scripts?

Third-party scripts perform many functions on your website, from tracking visitors and monitoring site performance, to adding custom functionality to your website. These scripts are typically written in JavaScript (JS) and can have a negative impact on website performance. While the JS script that is placed into your HTML may be relatively compact, the script itself may load thousands of lines of code from a remote server that must be loaded by your browser. When you add a handful or more of these scripts to your site, often all loading from a different server, the processing overhead is multiplied.

Asynchronous JavaScript to the rescue!

To help improve website performance while loading these scripts, many of them are utilizing Asynchronous JavaScript. This allows the browser to continue loading the website, while concurrently loading the script in question, rather than waiting for the script to finish loading, then proceeding to load the HTML that follows. Google Analytics utilizes asynchronous JS. Google recommends that the analytics script be placed as high up in the HTML for the page as possible. By loading asynchronously, it does not impact the loading of the rest of the page.

Where should my third-party scripts be placed?

There is no simple answer to that question. It really depends on what the script is doing and whether it’s functionality dictates where it needs to be. As a rule of thumb, if the script provider tells you that it can be placed in the HTML footer and/or the functionality of the script is not affected by being placed in the footer, place the script in the footer. Most dealerships do not manage this on their own, so you will have to ask your dealership website provider to do this for you. Of course, if the script in question is asynchronous, then it should not impact performance by being placed in the HTML head.

Measuring the impact of third-party JavaScript on your website

Some third-party scripts load poorly optimized JavaScript that loads very slowly. This can have a significant impact on your website performance and even lead to decreased user engagement, increased bounce rates, and even lower search engine ranking. As of July 2018, Google uses page speed as a ranking factor in their mobile search results. This is particularly important as most websites today get more of their traffic from mobile devices. Google offers a free tool called PageSpeed Insights, which provides feedback on slow loading scripts and many other performance hindering aspects of your website. Try testing your website before and after adding new third-party scripts to get a better understanding of its impact. A poorly performing script can add seconds to your page load times, and the effect is amplified on slower mobile connections.

Regularly audit the scripts on your website

In a perfect world, you would add a recurring event to your calendar to audit your website and ensure the scripts you have loading are all still required and performing optimally. You may have scripts from former chat providers, advertising partners, and numerous other sources that are no longer required. If you are unsure of how to audit your website for third-party scripts, reach out to your website provider and ask them to provide you with a list of existing third-party scripts. Knowing which scripts are outdated can be a difficult task. You may have to reach out to different departments at your dealership to ensure they are still utilizing the scripts featured on your website.

Blog

Learn more