When I was at ScoreBig,1ScoreBig changed ownership after I was there. They’ve redone their website since I left. our page load time was bad. Our homepage took seven seconds to load. Over the course of six months, we got that down to three seconds. When we first discussed the project as a tech team, we had an immediate suspect for page load time. It became our Public Enemy No.1: Marketing pixels.
“Marketing Pixels”
They go by other names – web pixels, beacons, tags. Around our tech team, we called them “marketing pixels” because, well, they were pixels and they usually came from the marketing department in requests like, “Hey, can you add this one line of JavaScript to our site so we can use Company X’s services?” There’s a pixel for just about everything, and they’re things that are too complex to build in-house:
- Visitor analytics: Google Analytics, Localytics
- Providing a chat service to your visitors: olark, AskTipster2Built by yours truly.
- Powering ads on your site or off your site with retargeting ads: Google AdWords, Criteo
- Measuring conversion for purposes of paying affiliates: Commission Junction
- Adding email capture popups, interstitials and banners to your site to encourage conversion: Bounce Exchange
We had 30 different marketing pixels on ScoreBig’s site, so we figured this was a great place to start to attack our page load time issues.
The Investigation
There’s lots of information pointing to how marketing pixels impact load time. Take this note from Tealium’s blog:3Tealium’s tag management product completely revolves around making it easy to manage a large number of marketing pixels on your site
Each third-party tag adds at least 50 milliseconds to your page load time on the first visit to your site. The average tag takes well over 50 milliseconds to load. If you have 10 tags on one page, that can add seconds to your page load time.
Page speed tests like YSlow will tell you to keep the number of files you’re loading to a minimum, and the domains you’re loading from to a minimum. Marketing pixels increase the number of both of these, so the more marketing pixels, the worse you’ll score on page speed tests.
To address our marketing pixels, we built special JavaScript that would wait to load low priority marketing pixels4For example: Google Analytics was high priority. We wanted to get user analytics even if the user abandoned the page before it loaded. Olark, which powered our customer service chat, was low priority. We didn’t need to show that until the rest of the page had loaded. until after the essential part of the page loaded (pixels typically start loading at the same time as everything else on the page). Additionally, I coordinated an organization-wide review of every marketing pixel on the site. We removed eight that we weren’t using any more.
The Results
So based on all conventional wisdom, doing something about our 30 marketing pixels should have improved things, right? Well, sort of. Our page load speed improved by 0.2 seconds.
Wait, shouldn’t that have had a bigger impact? Tealium says each pixel takes at least 50ms to load, and we removed eight, so that should be at least 0.4 seconds, right? Well, that blog post is misleading. Yes, pixels take at least 50ms to load, but pixels load simultaneously. So you aren’t waiting for one to load and then loading the next one, you’re loading many pixels at the same time.5I mentioned we cut four seconds off of our page load time. The majority of the page speed improvement we had was based on changing our server infrastructure to reduce latency between components and switching to a next-generation CDN called Instart Logic. Outside of those two, it was a series of small wins, like the marketing pixel cleanup.
Anecdotally, our site was less sluggish. We used a lot of complex Angular applications and we noticed the page felt speedier when there was less JavaScript running. It makes sense in theory – if there are fewer third-party pixels sucking up CPU for JavaScript, there’s more for our core website. We never found a way to properly measure that though.
Takeaways
We did improve our page load time by optimizing our marketing pixels, but it wasn’t a big impact. Here’s what I learned:
1. Test your hypothesis about removing marketing pixels – or any other page load tactic – as quickly as you can.
We didn’t have a proper staging environment at ScoreBig, so it was challenging to get a nice apples-to-apples comparison of the site with and without marketing pixels. But if you have that and can get reliable page speed data, test that out as soon as possible to see if it’s worth it. This goes for other page load tactics too. For example, the page load recommendations provided by YSlow or Google Page Insights can be very tough to implement and only provide a small amount of page load improvement.
2. Find a way to manage the pixels that your organization has.
We started a Google Doc that was shared across the organization with every pixel on the site. Each pixel had an internal owner. Once a quarter, I would check with the owner of the pixel and be sure it was still in use. If it wasn’t, we’d remove it. If I couldn’t find an owner, I’d remove it. This had benefits for the whole organization beyond marketing pixels. For example, if we got an invoice from a company, Finance knew from the spreadsheet who owned the relationship with that vendor. And if one department is considering signing up a new vendor, they could review the list of existing vendors to see if another department already had a relationship with a similar company.
3. If you use a lot of pixels, explore tag management solutions.
We used Google Tag Manager, which was free and fairly technical. However, if you’re dealing with a lot of pixels, there are some benefits to getting a true enterprise tag management system like Tealium or Ensighten. We considered signing up for these services at ScoreBig because with these products, it would be possible to cut tech out of the picture so the marketing could add pixels to the site without having to send it through our development process.
There are also companies that reduce the number of pixels on your site by consolidating pixels for you. You would, for example, make one call to their server, then they would make five calls from their server to the APIs of pixels you use. That way, you can still get the benefits of Pixel A, B and C but only have one pixel on your site. Tealium provides this service, as does Segment. I have not used these services, and I suspect the page load benefit wouldn’t be worth the cost. But every company is different, so it’s worth a try – just be sure to measure your results.
Even if they aren’t big culprits in page speed, marketing pixels can have other negative impacts on users. I’ll be writing some future posts with case studies of sites where marketing pixels do cause very real issues for users.