GTM Kit 2.25: See when your CDN loads your container too
GTM Kit 2.25 tells you when something other than GTM Kit loads your Google Tag Manager container, and fixes two things that could make the settings screen work against you.
What changed
Know when your CDN or host loads your container
Some CDNs and hosts offer a Google tag gateway of their own, Cloudflare among them. When it is on, the CDN adds its own loader for your container to the top of every page on the way to your visitors. Your WordPress site never sees it, because it happens after the page has left your server.
GTM Kit now checks for it. Once a day it requests one of your pages the way a browser does, and when you open the GTM Kit settings it asks for the same page from your browser too, because some servers cannot reach their own CDN. When it finds a loader for your container that GTM Kit did not print, it tells you in two places:
- a notice on the GTM Kit dashboard, naming the CDN when the evidence does (Cloudflare) and saying “your CDN or host” otherwise
- a line under Setup > Google tag gateway showing the path the CDN serves your container from
This is not duplicate tracking. Two loaders for one container start that container once: in our tests with Cloudflare’s gateway on, each page load produced one page view, with and without consent, and with GTM Kit’s own gateway on as well. GTM Kit changes nothing because of the finding. The notice only tells you what is on your pages, and you can dismiss it. Read what it means.
Saving works again on settings stored in an older format
A switch stored as text such as “on” or “yes”, for example by an older release or another tool, could stop every save of the settings and lock the WooCommerce settings. GTM Kit now converts such values when you save, converts them once when you update to 2.25, and a refused save names each setting the way the settings screen shows it.
Dismissed notices stay dismissed
Viewing your site or the dashboard while logged in could clear your stored GTM Kit notices, so the Dismiss button seemed to do nothing. Dismissals now stick.
Other fixes
- A switch saved as text such as “false” by another tool is now read as off everywhere, including the Google tag gateway, which kept serving until the next save.
- Deleting GTM Kit now removes all of its data, including the review prompt state.
- The dashboard no longer says GTM Kit is sending data to your container when it may not be.
Developer notes
- Add-ons can render their own cards on the GTM Kit dashboard through the
gtmkit.dashboardslot (Fill name="gtmkit.dashboard"from@wordpress/components). A Fill with no matching slot renders nothing, so an add-on card is simply absent on an older GTM Kit. GTM Kit Premium 1.10 uses it for its order tracking card.
Upgrade notes
- On update, GTM Kit converts switch settings stored in an older format once. Nothing to do.
- GTM Kit 2.25 is tested with WordPress 7.2.
- Nothing else changes on update. The CDN check needs no setting.