This is a huge problem…
and its not just GTM, its the entire GoogleShopping system and all the other tracking we need to do on the final conversion page.
I have spent the last 6 weeks pouring over the so called “custom pixel documentation” and my conclusion here is:
“We have a problem. This new system does not allow scripts to be embedded”
That means:
ALL Conversion scripts that rely on externally embedded JS will fail on the order confirmation page.
This includes, but is not limited to: GTM, Google Analytics, Conversion Events, FB/META api conversion events even the GoogleShopping Survey code can not be loaded…
As a DEV who has watched the Shopify system be degraded by poorly coded apps and other shenanigan’s I understand why Shopify did this, intentionally. However… as a dev with several Shopify clients I also feel their pain.
The only way around this I can see is to tell people to upgrade to 2300mo Shopify Plus.
Here is the LINE:
If you need to embed an external Javascript on your checkout page…
I see no way to pull that off using the new Pixel system.
I am thinking the solution is simple and elegant:
We must WAIT for the OFFICIAL channel APPs to update their systems.
Google-Shopify APP must do the integration themselves and phase out their external scripts
FB/IG META Shopify APP must also do the same, to tap into the FB conversions API
TicTok and any other 3rd party integration (such as HotJar or Whale, or any of them)
must also follow suit.
I believe this is INTENTIONAL on Shopify’s part.
However, I think that as dev’s we are SOL and the situation is FUBAR.
Perhaps… rightly so.
Too many thieves in the “app ecosystem” putting bugs and vulnerabilities into Shopify stores.
Even just last month I found a client who had a theme that was “collecting” the email’s from the front end and sending them to the “theme developer”, basically harvestings people’s information. Last year I saw scripts IN THEMES that were not loading, but were clearly designed to “try” to capture credit card numbers.
Alas…
This decision by shopify is simple:
Give up on injecting a JS file into the checkout page.
They are purposely locking that down to remain PCI compliant.
We must instead pressure GOOGLE to patch their official channel app.
for example:
https://support.google.com/google-ads/thread/277882275?authuser=2&hl=en&sjid=4123835932993297937-NC
https://community.shopify.com/c/shopify-discussions/how-do-we-install-google-merhcant-center-opt-in-script-now-that/m-p/2600848#M445111