Closed nnagewad closed 1 month ago
Hmmm, this makes me very uneasy. There’s nothing worse than injecting somebody else’s JavaScript into a webpage… except perhaps Google’s JavaScript.
Appreciate the need, but in my opinion, some things should be difficult to achieve, and injecting third-party scripts is right up there on that list.
Making it easier to extend templates will be the way forward for making such changes, I think. I’ll start looking into how that may work soon.
In the meantime, maybe there are other ways we can enable extending the base
template?
This is a proposal to add Google Tag Manager to XGOV's Eleventy plugin.
This requires updating the
base.njk
layout by adding a conditional statement on whether a Google Tag Manager identifier is added viaeleventy.config.js
file.