Sixteen third-party scripts: the audit
What the tag stack on a Shopify Plus store was costing in main-thread time, how each tag was handled, and what the report said about them a year later.
A DTC brand of any size runs a tag stack: analytics, A/B testing, session recording, affiliate pixels, SMS, reviews, search. Each one was added by someone with a good reason. Together, on the Lovepop home page before the programme, they blocked the main thread for 840ms, which was almost the entire Total Blocking Time.
This is the audit we did, tag by tag, and the three things you can do with each one.
What the before report said
Sixteen third parties, by main-thread blocking time:
| Third party | Transfer | Blocking |
|---|---|---|
| Google Tag Manager | 417 KiB | 287ms |
| Intelligems (A/B testing) | 100 KiB | 246ms |
| Clarity (session recording) | 32 KiB | 113ms |
| TikTok | 125 KiB | 87ms |
| Constructor (search) | 190 KiB | 61ms |
| Integrations platform | 11 KiB | 25ms |
| Postscript (SMS) | 283 KiB | 14ms |
| 82 KiB | 6ms |
By total CPU time the picture was similar: Tag Manager 777ms, Intelligems 627ms, Heap 452ms, Clarity 294ms. And this was only the home page. Product pages carried reviews and recommendations on top.
Three things you can do with a tag
Delete it. The fastest optimisation available. A tag for a campaign that ended, a pixel for a channel the brand no longer buys, a second analytics tool somebody trialled. This needs the owner in the room, because the developer does not know which ones are dead. We put the list in front of marketing with the cost next to each line and asked.
Delay it. For everything that stays, the question is whether it needs to run before the first paint. Analytics does not. Session recording does not. The A/B testing library is the hard case: if it changes what the visitor sees, running it late causes a flash of the original. On Lovepop it was delayed to first interaction with the test variants applied by CSS where possible, which is a compromise, and a documented one.
Move it out of the tag manager. Tag Manager is convenient and it is a loophole: anyone with access can add a script that blocks the main thread, and nobody in the theme repository sees it. The tags that matter most went into the theme as code, where they go through review. The ones that stayed in Tag Manager were delayed as a group.
What the after report said
On 27 September 2025 the same audit on the same page:
| Third party | Transfer | Main-thread time |
|---|---|---|
| Heap | 40 KiB | 16ms |
| Intelligems | 100 KiB | 5ms |
| jsDelivr (slider library) | 16 KiB | 4ms |
| unpkg (chat styles) | 9 KiB | 0ms |
Four, down from sixteen on the critical path. The others still run; they run after the page has painted and the visitor can tap, so Lighthouse no longer sees them on the main thread during load.
Lighthouse still listed 90 KiB of unused JavaScript, most of it the A/B testing bundle and a jQuery the theme no longer needs. That is the next thing on the list, and it is a smaller list than it was.
The part that is not technical
The audit is a spreadsheet with one row per tag, three columns, and an owner’s name on each row: cost, what it does, keep or not. The developer fills in the first two. Everything after that is a conversation, and the conversation is most of the work.