Manual GTM Code vs. Plugin: Best Way to Fix WordPress-to-Shopify Tracking
When Google Analytics 4 reports 40%+ of your Shopify checkout orders as coming from (direct) / (none), store managers face a choice: spend hours setting up complex Google Tag Manager (GTM) custom Javascript listeners or install a dedicated zero-code WordPress plugin. Here is an honest, side-by-side technical evaluation.
1. The Manual GTM Approach: Complexity & Edge-Case Breakages
Configuring cross-domain tracking in GTM requires enabling Google's linker parameter in the GA4 Configuration tag settings (Domains: checkout.myshopify.com).
However, GTM's built-in linker only decorates standard static links that exist in the initial HTML document when the GTM container initializes.
document.addEventListener('click', function(e) {
var el = e.target.closest('a');
if (el && el.href.includes('myshopify.com')) {
// Custom GA4 cookie extraction
var ga = getCookie('_ga');
var fbc = getCookie('_fbc');
if (ga) el.href = appendParam(el.href, '_gl', formatGLToken(ga));
if (fbc) el.href = appendParam(el.href, '_fbc', fbc);
}
});- AJAX Slide-Out Cart Drawers: Cart popups injected via AJAX after page load bypass standard GTM listeners.
- Theme Updates: Changing theme templates or installing cart plugins often breaks custom JS DOM selectors.
- Form Submit Actions: GTM link decorators do not automatically catch HTML
<form action="...">posts. - No Meta & TikTok forwarding: GTM GA4 tags do not forward Meta
fbclidor TikTokttclidparameters.
2. Feature Comparison Matrix: GTM vs. GA4 Linker
| Requirement | Manual GTM Code | GA4 Linker Plugin |
|---|---|---|
| Setup Time | 2-4 Hours (Developer required) | < 60 Seconds |
| AJAX Slide-Out Carts | Breaks on dynamic DOM insertion | Real-time MutationObserver |
| Meta (fbclid) & TikTok (ttclid) | Manual Javascript required | Automated Forwarding Engine |
| Form Submit Action Stitching | Complex custom form listeners | Built-in Form Handler |
3. The Verdict: Save Hours of Maintenance
Why waste hours writing brittle GTM custom code when GA4 Linker handles link decoration, form submit stitching, Meta pixel forwarding, TikTok click parameters, and AJAX cart MutationObserver automatically?
Get GA4 Linker Plugin Now →