Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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.
Description
Park last-touch UTMs and ad click IDs from
/agent-walletdocs landings (including the quickstart) in the sharedmm_attributioncookie (Domain=.metamask.io). This matches metamask.io so a later sign-in ondeveloper.metamask.iocan still attribute the campaign./agent-walletand the URL has at least one whitelisted UTM or click ID (utm_source,utm_medium,utm_campaign,utm_term,utm_content, plusgclid/twclid/fbclid/msclkid/ttclid/li_fat_id)gclidSecure,SameSite=LaxThis is site JS, not a documentation content change.
Issue(s) fixed
N/A
Preview
To verify: open the preview with
?utm_source=google&utm_medium=cpc&gclid=abcand confirmmm_attributionis set for.metamask.io. Localhost will not keep the cookie because of the shared domain.Checklist
External contributor checklist
Note
Medium Risk
Writes a cross-subdomain tracking cookie with user-supplied query params; mitigated by whitelisting, sanitization, and size limits aligned with server-side attribution handling.
Overview
Adds last-touch marketing attribution on Agent Wallet doc landings so UTM and ad click IDs from the query string are stored in the shared
mm_attributioncookie fordeveloper.metamask.ioto read later.A new Docusaurus client module runs on route changes (skipping no-op navigations) and calls
writeAttributionCookie, which only runs on paths containing/agent-walletwhen at least one whitelisted UTM or click ID is present. The writer sanitizes and caps keys/values to match the developer dashboard and backend limits, merges with an existing cookie so new URL params win without dropping unrelated prior click IDs, setsDomain=.metamask.io, 90-day expiry, andSecure/SameSite=Lax.docusaurus.config.jsregisters the module alongside the existing scroll-fix client script.Reviewed by Cursor Bugbot for commit 41c8252. Bugbot is set up for automated code reviews on this repo. Configure here.