Conversation
Adds Google's GTM snippet to every HTML file the hub ships: the loader right after <meta charset> and the noscript iframe as the first element in <body>. Covers index.html and the two GitLinq move pages (gitlinq/, gitlinq/docs/). The container already carries the GA4 tag (G-PVH5EZ8XPP), so nothing else is wired here. The site has no CSP meta, so no policy needed widening. The footer gains a link to the company privacy policy (devslab.kr/privacy/), which is the policy for this hub too. Its label uses the same 14 strings devslab.kr's own footer uses, and the link carries ?lang= so the reader lands on the policy in the language they were reading (Korean, otherwise English). Same .foot-links style as the neighbouring links, no external-link arrow. tests/gtm.test.mjs walks the tree for every .html file and checks one loader (run in a VM to confirm it requests this container's gtm.js), placed first after <meta charset>, and one noscript opening <body>; a page added later fails until it carries the container. It also checks the privacy label covers exactly the hub's SUPPORTED locales.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
<meta charset>, the<noscript>iframe as the first element in<body>. Pages:index.html,gitlinq/index.html,gitlinq/docs/index.html(the hub has no 404 page or other HTML). The container already carries the GA4 Google tag (G-PVH5EZ8XPP), so nothing else is wired here.개인정보처리방침,Privacy Policy,プライバシーポリシー, ...), swapped by the existing i18napply(). The link carries?lang=<locale>so the reader lands on the policy in the language they were reading (devslab.kr shows Korean, otherwise English; it does not persist a?lang=value). Same.foot-linksstyle as the neighbouring links; no external-link arrow.Tests
tests/gtm.test.mjs(runs undernpm test):.htmlfile, so a page added later fails until it carries the container;<meta charset>; the loader is executed in a VM and must requesthttps://www.googletagmanager.com/gtm.js?id=GTM-5WGTTWSF; exactly one noscript, and it is the first element in<body>;https://devslab.kr/privacy/and its label map covers exactly the hub'sSUPPORTEDlocales.Red check: with one page reverted to
main, the new suite fails 2 of 8.Verification
npm test: 22/22 pass (run on an LF export of the commit; a Windowsautocrlfcheckout fails the existing brand-snapshot hash test regardless of this change).scripts/serve.mjs:window.google_tag_managerlistsGTM-5WGTTWSFandG-PVH5EZ8XPP;dataLayerrunsgtm.js,gtm.domandgtm.load; requests went out togtm.js?id=GTM-5WGTTWSF,gtag/js?id=G-PVH5EZ8XPPand a GA4page_viewcollect.mainat 1280 and 390, light and dark.