Repository navigation
feat: GA4 Measurement Protocol server destination - #765
Open
laurentdav wants to merge 2 commits into
Open
laurentdav wants to merge 2 commits into
laurentdav wants to merge 2 commits into
Conversation
Closes elbwalker#764 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 33 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
Same finding as on the sibling OpenAI Ads PR: a failed request goes to the dead-letter queue; 429 and 5xx are only marked retryable. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch has not been deployed
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.
Closes #764.
What
New package
@walkeros/server-destination-ga4for the GA4 Measurement Protocol, laid out like the other HTTP destinations:POST <url>?measurement_id=…&api_secret=…(defaulthttps://www.google-analytics.com/mp/collect;urlfor EU collection or/debug/mp/collect).nameis the GA4 event name, space →_; an invalid name fails withmappingbefore any request.data:client_id(<random>.<seconds>from_ga),session_id(sent in params),user_id,params(valuecoerced to a number). Without a valid client id, a stable one is derived from the event id so retries keep it.engagement_time_msec: 1added.consent.ad_user_data/ad_personalization:GRANTEDonly with the event'smarketingconsent.timestamp_microsonly for events under 71 hours (GA4 refuses older ones).measurementId(validatedG-…),apiSecret,url.Also: docs page (links the gtag web destination for browser events), sidebar entry, server column of the GA4 row in the destinations index, website dependency, changeset (minor).
Verify
npm run verify:touched -- server-destination-ga4: typecheck, lint, conformance, 3 step examples + silent rule, 12 unit tests.walkerOS.jsonbuilds.We run a vendored version of this destination on our own walkerOS server flow; this PR is that code ported to the monorepo conventions (the default endpoint is the global one here, ours is region1).
🤖 Generated with Claude Code