Recently I was optimizing a store for its loading speed. I would like to know what you all do to optimize 3rd party scripts loading on the page especially meta pixel and GA4 tracking via GTM. Or any tools that you guys use to optimize the loading speed of the page without using any app to optimize the store.
Hi @NerdCurator ,
" Google Tag Manager - the best option to optimise the 3rd part script. "
You are already using the GTM, i audit your wordpress store & found some issues,
1- Internal script
2- Specially part " to heavy"
3- Minimize main-thread work
Hi, @NerdCurator
This usually happens because tracking scripts load early and execute multiple requests in the critical render path, which impacts Core Web Vitals.
- Delay Non-Critical Scripts (Biggest Impact)
- Load GTM after user interaction or with a small delay
- Alternatively, trigger tags only after window.onload
window.addEventListener(‘load’, function() {
setTimeout(function() {
// Load GTM script here
}, 2000);
});
This removes scripts from the initial render path, improving LCP and TBT significantly.
- Reduce What GTM Loads (Often Overlooked)
Most containers are heavier than they need to be.
- Remove unused tags, triggers, and variables
- Avoid firing all tags on “All Pages”
Even if GTM loads fast, what it executes inside matters more.
- Use Consent / Conditional Loading
Only load tracking when needed:
- Consent-based triggers
- Skip loading for bots or low-intent sessions
Fewer users = fewer script executions = better real-world performance.
- Use defer / Async Carefully
- GTM itself is async, but any custom scripts inside themes should use defer
- Avoid injecting blocking scripts in
Prevents render-blocking behavior.
It’s also worth periodically reviewing which scripts are active on your store to keep things lean and efficient.
If you’d like to automate this process further, Website Speedy can help manage script loading and improve Core Web Vitals performance. Full disclaimer - we are the developers of this tool. Completely optional alongside the manual steps.
Hope this helps!
Thank you for taking time to respond. But I am not looking to optimize our company’s website which is on WordPress. The query was how to improve the loading speed of a Shopify store when it comes to 3rd party script.
Honestly on Shopify 2.x the Web Pixels API is the native play for this - runs in a sandboxed worker off the main thread so the pixel and GA4 events don’t block rendering. Not every vendor supports it yet but Meta and Google both do.
For the ones you still need in GTM, two things that helped me most:
First, trigger priority. Page load triggers can be staggered. PageView tags for attribution fire immediately, but remarketing audience tags or social pixels that don’t need the initial view can move to First Scroll or Element Visibility. Most merchants don’t realize these trigger types exist.
Second, just cut tags. Every store I’ve looked at has 8-12 tags in GTM and maybe 3 produce any decision the marketing team actually uses. Most of the speed gain comes from just removing the ones no one touches.
What tags are showing up as your biggest blockers in the speed report?
"Truly - It’s not possible, but you can use GTM smartly ( only useful tags and fire ), but Server-Side Tracking best solution to reduce the load speed.


