Optimizing website performance with server-side tag management

A fast, performant website is non-negotiable. Discover how server-side tag management can help with optimizing your website performance.

Share with others

Your customer's journey and your website performance are interconnected. The data doesn't lie; studies show that website load time can have a significant impact on conversion rate with each second of load time decreasing conversion rate. It doesn't just affect your conversion rate, as it's also a factor in ranking content on search engine like Google.

Despite the importance of page speed on conversion rates and user experience, site speed improvement has been flat. According to a study by Portent, site speed improvement has been flat for B2B websites and E-Commerce sites have only seen a slight increase. This was compared to a study completed in 2019.

One of the perennial thorns in the side of site speed optimization is client-side tag management systems. They bloat page speed time for a host of reasons (which we'll get into) but they are also indispensable to marketing teams tracking data. Thankfully, there is an alternative to client-side solutions: server-side tag management.

Server-side offers a robust set of benefits for website optimization. In this post, we're going to do a deep dive into these benefits and why you should consider it. 

Client-side tracking is slowing down your website

Client-side tagging solutions are slowing down your website. They excel in one area: client-side tagging solutions are easy to use. Tools like Google Tag Manager allow non-developers to add third-party scripts, set up conversion tracking, and install advertising pixels. 

The tradeoff of this ease-of-use is that the client-side solution considerably slows down website performance. Without careful management of how you load scripts, those "easy-to-add" scripts are loaded on every page. These scripts are general purpose and cover a variety of use-cases such that the script may contain 1000s of lines of code. 

If you run pagespeed analysis on a website with a client-side tag container, you'll often find that those containers are flagged. A common solution is to defer the client-side script from loading but it doesn't work in the case of tools like Google Tag Manager. As one StackOverflow user put it, "on a sliding scale from convenience to performance, GTM is all the way on the side of convenience."

Server-side is a viable alternative, not just because of its performance benefits but also because of the ability to precisely control every element of your tag setup.

Server-Side Tagging for Website Optimization and Page Speed

So how is server-side tagging actually faster? Let's look 11 different ways that server-side is better for website optimization and page speed:

  • Reduced browser parsing
  • Fewer HTTP requests
  • Asynchronous tag loading
  • Caching efficiency
  • Reduced payload size
  • Parallel processing
  • Enhanced Control and Flexibility
  • Improved Debugging and Monitoring

Reduced browser parsing

When a user visits your website, the web browser like Chrome or Safari is given a lot of instructions–files to read, images and code to render, and scripts to execute. Too many instructions, and your user's web browsing experience slows to a crawl. Client-side tagging solutions introduce piles of new instructions to your browser and can dramatically slow down browser parsing.

Server-side tagging moves the parsing and execution of JavaScript files to the server. Instead of leaning on the browser to execute these scripts often at the expense of rendering essential files, the server handles this and only sends necessary data back to the browser. This approach reduces the number of HTTP requests and optimizes rendering performance by eliminating client-side script execution.

Example: Advertising pixels

While client-side tagging delivers on the promise of making it easy to add advertising pixels to your website, it's arguably too easy. Each time a page is loaded, so are pixels for advertising like Facebook, Google Ads, and others, each sending individual HTTP requests. With server-side tagging, only the required events are captured and sent to the server. A single conversion event, like a form submission, is sent to the server and then server-side logic determines which vendors to distribute that data. 

Fewer HTTP requests

Think of it this way: if you were going to organize a discussion at your work about a topic over email, would you send an email to each person involved in the topic or would you CC everyone in one email? When it comes to HTTP requests, that's the difference.

Server-side tagging reduces the number of HTTP requests by consolidating them into a single request handled by the server. In client-side setups, every event triggers multiple HTTP requests to various analytics, advertising, and other third-party services (just like sending a separate email to each individual in your company). By moving server-side, events are sent once to the server which then distributes the data to various endpoints. 

Example: E-commerce conversion tracking

Let's say a user completes a purchase. In client-side tagging the browser fires separate HTTP requests to Google Analytics, Facebook Ads, and other tracking platforms. In server-side tagging, by contrast, a single HTTP request is sent to the server; it's then up to the server to send conversion data to the relevant platforms. The browser is then unburdened by these HTTP requests, keeping the webpage highly performant and interactive. 

Asynchronous tag loading

Do you remember as a kid when you'd get handed a list of chores to do? Imagine being able to start them all at once and get them done faster – that's the difference between server-side tagging and client-side tagging.

With server-side tagging you can set up asynchronous tag loading to ensure that those tags don't block rendering of page elements. This is key for ensuring your page is interactive (one of the core metrics in Google's Core Web Vitals). The common approach to enforcing asynchronous tag loading in client-side tracking is to use the 'async' or 'defer' attributes, but these don't always behave as expected. With server-side, tags are processed and loaded without holding up the rest of the page: a big win for page speed and user experience. 

Example: Image Gallery

For a web page that displays resource-intensive media like an image gallery, client-side tagging can considerably slow down page processing while it waits for analytics and advertising tags to load. With server-side tagging, the server asynchronously processes the necessary tracking tags and lets the browser load the images unimpeded. 

Caching efficiency

Browser caching isn't something most end users think about but it can have a big impact on page speed. Everyone has a favorite coffee or tea cup? Instead of being in the same place (i.e., you cupboard) it was in a random spot in your house each time you wanted to use it. You'd have to then go find it. What if it was where you always wanted it to be? Well, if your browser doesn't know where your cup is, it's got to take a moment and look for it. Of course, it's a lot easier if it's in the same spot every time?

Server-side tagging involves using a centralized caching mechanism to store frequently accessed data. Instead of sending the browser around your entire house for a single artifact, the data is right there and ready to be fetched by the client. This reduces repetitive data fetching and minimizes network latency because cached data can be quickly retrieved, reducing the amount of data sent to the client and improving load times.

Example: Analytics Data

Modern web analytics tools aim to track events like button clicks, page views, and form submissions. With client-side tagging, each time an event occurs it triggers an HTTP request to send that data to the analytics vendor. In server-side tagging setups, analytics data is cached on the server which reduces the need for repetitive data fetching and minimizing network overhead.

Reduced payload size

Imagine you were writing a letter and every drop of ink weighed 1 pound. Let's also assume you had to pay per pound to mail that letter. I'm willing to bet you'd keep your letter brief, concise, and to the point. The thing with many vendor scripts is that they send a lot of unnecessary information – for our letter writing analogy, it'd be like including information like what you ate for dinner the night before, what the neighbors are up to, and barometric pressure at the time of writing when you're just sending an invite to an upcoming event.

Client-side tagging solutions unfortunately offer limited control over the data payload. They pick up and send a lot of extra data, which can slow down your website. With server-side tagging, you have direct control over what data is sent from the client to your server. Reducing the payload size has the dual benefit of resulting in quicker data processing and reduced latency in data transmission. 

Example: User activity tracking

Client-side tracking often involves sending detailed logs and redundant data points to vendor scripts. All this tracking slows down the browser and doesn't add anything to your web analytics data. On the other hand, server-side tracking lets you focus on critical information such as the event type, timestamp of the event, and user ID. This reduces the payload size and also improves web tracking by collecting exactly the data you need for your reports. 

Parallel processing

How'd you feel about group projects in school?Parallel processing is sort of like that: your browser has a bunch of work it needs to get done based on the requests your web page has made. Each request is like a subtask in an assignment. If you do it all on your own, then the homework project needs to be done in sequence; however, if you're in a group, you can do all the work at the same time and be done much faster.

Parallel processing in server-side tagging allows for multiple tags to execute simultaneously rather than sequentially. You have precise control over the way tags fire – unlike in client-side which may determine this process arbitrarily and certainly without your direct input. This has obvious web performance benefits, but it allows you to do data processing before distributing information to various endpoints. 

Example: Web Analytics Events

When you set up web analytics event tracking, it's possible to start tracking a lot of events. You can collect everything from link clicks, scroll depth, video engagement, and form submissions. This can represent a non-stop stream of data from your client-side tagging system to your web analytics provider. With server-side, you can organize this stream of data to prevent a firehose of data collection from drowning web performance. You may also choose to interrupt that flow, just briefly, so you can associate and append additional data to those events, such as segmentation and personalization data from other systems.

Enhanced Control and Flexibility

Remember playing with Lego? Maybe you'll remember that some of the most fun and creative play comes from playing with free-form. Sure, the instruction sets are part of the fun, but once the set is taken apart, you're left with blocks you can assemble into any creation you can imagine. This free-form creativity is a huge part of Lego's success – I think it's because it gets to the heart of human nature.

Maybe server-side isn't as fun as Lego (well, to us it is), but it offers the same type of control and flexibility that a set of Lego blocks does. Client-side tagging solutions often impose constraints on how you can implement tracking and tag firing. As with the example above, you can see how being able to control the data event stream gives you new and interesting options. What if you were able to take a web event like form submissions, match it to intent data from your CDP, and use that to send additional data to your web analytics tool? You can then start to easily segment web behavior and feed those insights to your conversion rate optimization efforts.

Example: Custom Data Collection

Client-side tags are often limited to predefined parameters, limited customizations, or are unable to query other tools to get additional data. With server-side tagging, you can take a custom event and dress it up with as much data as you want before distributing it to its destination endpoint. For example, augmenting form submission data with personalization data from a data appending tool.

Improved Debugging and Monitoring

Trying to diagnose issues in a closed system like a client-side tag solution can be like trying to fix a car without being able to look under the hood. It's pretty much impossible to fix something you can't see.

Server-side tagging gives you full ownership of the tagging process, which means you can implement comprehensive debugging and monitoring. This is a big challenge for both engineering teams and digital marketing teams with client-side setups. Errors are very challenging to diagnose in client-side tag setups because the system is a closed system. However, debugging in server-side tagging can be easily aligned with your existing development Q/A processes. 

Example: Error Tracking

In client-side solutions, your toolset for error tracking is often limited to the capabilities of the platform. This may be a challenge as the platform may not have the tooling required to capture all relevant errors or to provide details as to what caused the error. With server-side, you can implement robust, custom error tracking to ensure that all errors are well-documented and easy to troubleshoot.

Conclusion - The server-side difference on website performance

Compared to traditional, client-side tagging solutions, server-side tag solutions offer the customization and flexibility required to fully optimize website's for speed and usability. Server-side can make a difference on SEO and on user experience, not too mention better aligning with privacy and data protection regulations.

Ready to experience the difference? Send us a message and we'd love to give you a demo!

*Photo by Florian Berger on Unsplash