Release - #5
Merged
Merged
Conversation
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.
This PR was opened by the Changesets release GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated.
Releases
@stackmade/gtm-as-code@0.6.0
Minor Changes
extends:config composition: a config can pull inevents:,gtm.{variables,triggers,tags,folders}:,and
ga4.{dimensions,metrics,keyEvents}:entries from other YAML files, for shared conventions orreusable packs. Resolved in
loadConfig, so every command supports it automatically. The rootconfig always wins over an extends target, and a collision between two extends targets is a
validation error. Validation errors on merged-in content point at the file and line they actually
came from.
gtm-code generate, emitting typed event helpers fromevents:: anEventNameunion, oneparams interface per event, an
EventParamsmap, and atrack<E extends EventName>(event, params)function that pushes
{ event, ...params }ontowindow.dataLayer. Prints to stdout by default;--out <path>writes it to a file.gtm-code docs, generating a Markdown data dictionary fromevents:: one section per eventwith its description, key-event/consent flags, and a parameter table (type, required, custom
dimension). Prints to stdout by default;
--out <path>writes it to a file.packs/ecommerce.yamlandpacks/recommended.yaml,extends:-able GA4recommended events with their GA4-specified parameters. Added a
type: itemsevent parameter forGA4's ecommerce item array;
gtm-code generateemits it asItem[]backed by a sharedIteminterface. Also narrowed the reserved-parameter-name lint so
currencyis only rejected whenmarked
dimension: true, GA4 reserves it for custom dimension/metric creation, not for its ownrecommended events that require it as a standard parameter.
validate. Catches reserved event names and prefixes,reserved parameter names and prefixes, invalid name characters, the 40-character name cap, the
25-parameter-per-event cap, and the 50-event-scoped-custom-dimension-per-property cap, all offline
before
applywould otherwise hit them mid-run or have GA4 silently reject or scrub the data.